fix: typo

This commit is contained in:
Wesley F. Young 2024-09-03 21:04:29 +08:00
parent d8ed9292e3
commit 4d6bd0e5f7

View File

@ -44,12 +44,16 @@ export class LaanaMessageUtils {
const fileCacheIds: string[] = []; const fileCacheIds: string[] = [];
if (msgContent.repliedMsgId) { if (msgContent.repliedMsgId) {
const { msgSeq, msgId, senderUin } = ( const replyMsg = (
await this.core.apis.MsgApi.getMsgsByMsgId( await this.core.apis.MsgApi.getMsgsByMsgId(
await this.laanaPeerToRaw(params.targetPeer!), await this.laanaPeerToRaw(params.targetPeer!),
[msgContent.repliedMsgId] [msgContent.repliedMsgId]
) )
).msgList[0]; ).msgList[0];
if (!replyMsg) {
throw '回复的消息不存在';
}
const { msgSeq, msgId, senderUin, senderUid } = replyMsg;
elements.push({ elements.push({
elementType: ElementType.REPLY, elementType: ElementType.REPLY,
elementId: '', elementId: '',
@ -57,7 +61,7 @@ export class LaanaMessageUtils {
replayMsgSeq: msgSeq, replayMsgSeq: msgSeq,
replayMsgId: msgId, replayMsgId: msgId,
senderUin: senderUin, senderUin: senderUin,
senderUinStr: senderUin, senderUidStr: senderUid,
} }
}); });
} }