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,