refactor: GetGroupEssence

This commit is contained in:
手瓜一十雪 2024-08-29 00:10:29 +08:00
parent 130ff7517e
commit e91e054f20

View File

@ -38,12 +38,14 @@ export class GetGroupEssence extends BaseAction<Payload, any> {
let handledMsg: any[] = [];
for (let msg of msgs) {
switch (msg.msg_type) {
case 2:
case 1:
handledMsg.push(await this.parseEssenceMsgText(msg));
break;
case 3:
handledMsg.push(await this.parseEssenceMsgImage(msg));
break;
default:
break;
}
}
return handledMsg;
@ -85,7 +87,7 @@ export class GetGroupEssence extends BaseAction<Payload, any> {
operator_nick: msg.add_digest_nick,
message_id: message_id,
operator_time: msg.add_digest_time,
content: await this.obContext.apis.MsgApi.parseMessage(rawMessage, 'array')
content: (await this.obContext.apis.MsgApi.parseMessage(rawMessage, 'array'))?.message
};
}
const msgTempData = JSON.stringify({