From cc85985d088cb86b18728fdedf113c7d97f4c0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 28 Aug 2024 18:18:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AEnoify=E5=B7=B2?= =?UTF-8?q?=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis/group.ts | 4 ++-- src/onebot/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/apis/group.ts b/src/core/apis/group.ts index 1fd830f7..c5f388fd 100644 --- a/src/core/apis/group.ts +++ b/src/core/apis/group.ts @@ -33,8 +33,8 @@ export class NTQQGroupApi { } this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`); } - async clearGroupNotifiesUnreadCount(){ - return this.context.session.getGroupService().clearGroupNotifiesUnreadCount(true); + async clearGroupNotifiesUnreadCount(unk: boolean) { + return this.context.session.getGroupService().clearGroupNotifiesUnreadCount(unk); } async setGroupAvatar(gc: string, filePath: string) { return this.context.session.getGroupService().setHeader(gc, filePath); diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 062f0752..7ca93370 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -367,10 +367,10 @@ export class NapCatOneBot11Adapter { private initGroupListener() { const groupListener = new NodeIKernelGroupListener(); - + groupListener.onGroupNotifiesUpdated = async (_, notifies) => { //console.log('ob11 onGroupNotifiesUpdated', notifies[0]); - //await this.core.apis.GroupApi.getGroupNotifiesUnreadCount(); + await this.core.apis.GroupApi.clearGroupNotifiesUnreadCount(false); if (![ GroupNotifyMsgType.SET_ADMIN, GroupNotifyMsgType.CANCEL_ADMIN_NOTIFY_CANCELED,