Skip to content

Commit

Permalink
Merge pull request #267 from Fripine/fix/OB11GroupRequestEvent
Browse files Browse the repository at this point in the history
fix: wrong user_id in GroupRequestEvent
  • Loading branch information
MliKiowa authored Aug 16, 2024
2 parents 14ab21f + f428e57 commit 6fc5da9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/onebot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6fc5da9

Please sign in to comment.