diff --git a/src/core/apis/group.ts b/src/core/apis/group.ts index bd818ed9..1fd830f7 100644 --- a/src/core/apis/group.ts +++ b/src/core/apis/group.ts @@ -33,6 +33,9 @@ export class NTQQGroupApi { } this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`); } + async clearGroupNotifiesUnreadCount(){ + return this.context.session.getGroupService().clearGroupNotifiesUnreadCount(true); + } async setGroupAvatar(gc: string, filePath: string) { return this.context.session.getGroupService().setHeader(gc, filePath); } diff --git a/src/core/services/NodeIKernelGroupService.ts b/src/core/services/NodeIKernelGroupService.ts index b2f134c5..788b088c 100644 --- a/src/core/services/NodeIKernelGroupService.ts +++ b/src/core/services/NodeIKernelGroupService.ts @@ -189,7 +189,7 @@ export interface NodeIKernelGroupService { getGroupNotifiesUnreadCount(unknown: boolean): Promise; - clearGroupNotifiesUnreadCount(groupCode: string): void; + clearGroupNotifiesUnreadCount(unknown: boolean): void; operateSysNotify( doubt: boolean, diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 67c5a53d..062f0752 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -370,6 +370,7 @@ export class NapCatOneBot11Adapter { groupListener.onGroupNotifiesUpdated = async (_, notifies) => { //console.log('ob11 onGroupNotifiesUpdated', notifies[0]); + //await this.core.apis.GroupApi.getGroupNotifiesUnreadCount(); if (![ GroupNotifyMsgType.SET_ADMIN, GroupNotifyMsgType.CANCEL_ADMIN_NOTIFY_CANCELED,