This commit is contained in:
手瓜一十雪
2025-01-07 19:28:46 +08:00
parent 0dc4e3c371
commit 944b8eca5e
5 changed files with 73 additions and 37 deletions

View File

@@ -223,7 +223,7 @@ export class OneBotGroupApi {
} else if (element.type === TipGroupElementType.KMEMBERADD) {
// 自己的通知 协议推送为type->85 在这里实现为了避免邀请出现问题
if (element.memberUid == this.core.selfInfo.uid) {
this.core.apis.GroupApi.refreshGroupMemberCache(msg.peerUid).then().catch();
await this.core.apis.GroupApi.refreshGroupMemberCache(msg.peerUid, false);
return new OB11GroupIncreaseEvent(
this.core,
parseInt(msg.peerUid),

View File

@@ -1022,7 +1022,7 @@ export class OneBotMsgApi {
// 邀请需要解grayTipElement
if (SysMessage.contentHead.type == 33 && SysMessage.body?.msgContent) {
const groupChange = new NapProtoMsg(GroupChange).decode(SysMessage.body.msgContent);
this.core.apis.GroupApi.refreshGroupMemberCache(groupChange.groupUin.toString()).then().catch();
await this.core.apis.GroupApi.refreshGroupMemberCache(groupChange.groupUin.toString(), false);
let operatorUid = await this.waitGroupNotify(
groupChange.groupUin.toString(),
groupChange.memberUid,
@@ -1052,7 +1052,7 @@ export class OneBotMsgApi {
}, 5000);
// 自己被踢了 5S后回收
} else {
this.core.apis.GroupApi.refreshGroupMemberCache(groupChange.groupUin.toString()).then().catch();
await this.core.apis.GroupApi.refreshGroupMemberCache(groupChange.groupUin.toString(), false);
}
return new OB11GroupDecreaseEvent(
this.core,
@@ -1063,7 +1063,7 @@ export class OneBotMsgApi {
);
} else if (SysMessage.contentHead.type == 44 && SysMessage.body?.msgContent) {
const groupAmin = new NapProtoMsg(GroupAdmin).decode(SysMessage.body.msgContent);
this.core.apis.GroupApi.refreshGroupMemberCache(groupAmin.groupUin.toString()).then().catch();
await this.core.apis.GroupApi.refreshGroupMemberCache(groupAmin.groupUin.toString(), false);
let enabled = false;
let uid = '';
if (groupAmin.body.extraEnable != null) {