From f428e577242fa49cd4e47ef5045eafb17c354b6c Mon Sep 17 00:00:00 2001 From: Fripine Date: Fri, 16 Aug 2024 12:57:42 +0800 Subject: [PATCH] fix: GroupRequestEvent --- src/onebot/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 6985e2a6..f5472b14 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -396,12 +396,12 @@ export class NapCatOneBot11Adapter { } catch (e) { this.context.logger.logError('获取加群人QQ号失败 Uid:', notify.user1.uid, e); } - } else if (notify.type == GroupNotifyTypes.INVITE_ME) { + } else if (notify.type == GroupNotifyTypes.INVITE_ME && notify.status == 1) { this.context.logger.logDebug(`收到邀请我加群通知:${notify}`); const groupInviteEvent = new OB11GroupRequestEvent( this.core, parseInt(notify.group.groupCode), - parseInt(await this.core.apis.UserApi.getUinByUidV2(notify.user1.uid)), + parseInt(await this.core.apis.UserApi.getUinByUidV2(notify.user2.uid)), 'invite', notify.postscript, flag,