Add emoji likes list support to message types

Introduces the emojiLikesList property to RawMessage and maps it to the new emoji_likes_list field in OB11Message, which is populated in the GetMsg action. Also updates type definitions for stricter typing and consistency.
This commit is contained in:
手瓜一十雪
2026-01-13 16:43:00 +08:00
parent 30fd7009af
commit c1d2daa248
3 changed files with 31 additions and 20 deletions

View File

@@ -35,7 +35,16 @@ class GetMsg extends OneBotAction<Payload, OB11Message> {
// }
if (!msg) throw Error('消息不存在');
const retMsg = await this.obContext.apis.MsgApi.parseMessage(msg, config.messagePostFormat);
if (!retMsg) throw Error('消息为空');
msg.emojiLikesList?.map(emoji => {
retMsg.emoji_likes_list.push({
emoji_id: emoji.emojiId,
emoji_type: emoji.emojiType,
likes_cnt: emoji.likesCnt,
});
});
// 烘焙emoji_likes_list 仅此处烘焙
try {
retMsg.message_id = MessageUnique.createUniqueMsgId(peer, msg.msgId)!;
retMsg.message_seq = retMsg.message_id;