fix: 刷新群头衔缓存

This commit is contained in:
手瓜一十雪
2025-04-03 14:46:56 +08:00
parent 4fb8e6a4da
commit 2807ff5927

View File

@@ -151,14 +151,15 @@ export class OneBotGroupApi {
async parseOtherJsonEvent(msg: RawMessage, jsonStr: string, context: InstanceContext) { async parseOtherJsonEvent(msg: RawMessage, jsonStr: string, context: InstanceContext) {
const json = JSON.parse(jsonStr); const json = JSON.parse(jsonStr);
const type = json.items[json.items.length - 1]?.txt; const type = json.items[json.items.length - 1]?.txt;
await this.core.apis.GroupApi.refreshGroupMemberCachePartial(msg.peerUid, msg.senderUid);
if (type === '头衔') { if (type === '头衔') {
const memberUin = json.items[1].param[0]; const memberUin = json.items[1].param[0];
const title = json.items[3].txt; const title = json.items[3].txt;
context.logger.logDebug('收到群成员新头衔消息', json); context.logger.logDebug('收到群成员新头衔消息', json);
return new OB11GroupTitleEvent( return new OB11GroupTitleEvent(
this.core, this.core,
parseInt(msg.peerUid), +msg.peerUid,
parseInt(memberUin), +memberUin,
title, title,
); );
} else if (type === '移出') { } else if (type === '移出') {