From 92fe654850cc14ba33fd64ccb5045a080fc39291 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: Mon, 29 Jul 2024 08:12:49 +0800 Subject: [PATCH] fix #157 --- src/onebot11/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/onebot11/main.ts b/src/onebot11/main.ts index 9ae732a2..ed0b0ef7 100644 --- a/src/onebot11/main.ts +++ b/src/onebot11/main.ts @@ -279,7 +279,7 @@ export class NapCatOnebot11 { // } groupListener.onGroupNotifiesUpdated = async (doubt, notifies) => { //console.log('ob11 onGroupNotifiesUpdated', notifies[0]); - if (![GroupNotifyTypes.INVITE_ME,GroupNotifyTypes.ADMIN_SET, GroupNotifyTypes.ADMIN_UNSET, GroupNotifyTypes.ADMIN_UNSET_OTHER].includes(notifies[0].type)) { + if (![GroupNotifyTypes.INVITE_ME, GroupNotifyTypes.ADMIN_SET, GroupNotifyTypes.ADMIN_UNSET, GroupNotifyTypes.ADMIN_UNSET_OTHER].includes(notifies[0].type)) { this.postGroupNotifies(notifies).then().catch(e => logError('postGroupNotifies error: ', e)); } }; @@ -518,7 +518,8 @@ export class NapCatOnebot11 { } catch (e: any) { logError('获取群通知的成员信息失败', notify, e.stack.toString()); } - } else if ([GroupNotifyTypes.JOIN_REQUEST].includes(notify.type)) { + //notify.status == 1 表示未处理 2表示处理完成 + } else if ([GroupNotifyTypes.JOIN_REQUEST].includes(notify.type) && notify.status == 1) { logDebug('有加群请求'); const groupRequestEvent = new OB11GroupRequestEvent(); groupRequestEvent.group_id = parseInt(notify.group.groupCode);