fix: 跳过空消息

This commit is contained in:
手瓜一十雪
2024-08-13 00:38:42 +08:00
parent 48065e42e9
commit 508a3f7164
6 changed files with 22 additions and 13 deletions

View File

@@ -53,7 +53,7 @@ export default class GetFriendMsgHistory extends BaseAction<Payload, Response> {
msg.id = MessageUnique.createMsg({ guildId: '', chatType: msg.chatType, peerUid: msg.peerUid }, msg.msgId);
}));
//转换消息
const ob11MsgList = await Promise.all(msgList.map(msg => OB11Constructor.message(this.CoreContext, msg, 'array')));
const ob11MsgList = (await Promise.all(msgList.map(msg => OB11Constructor.message(this.CoreContext, msg, 'array')))).filter(msg => !!msg);
return { 'messages': ob11MsgList };
}
}