fix(core): handle messageEmpty in dialog.lastMessage

This commit is contained in:
alina 🌸 2025-01-05 06:25:18 +03:00
parent 2ee7166682
commit f85ff93d23
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -206,7 +206,10 @@ export class Dialog {
const cid = this.peer.id
if (this._messages.has(cid)) {
return new Message(this._messages.get(cid)!, this._peers)
const msg = this._messages.get(cid)!
if (msg._ === 'messageEmpty') return null
return new Message(msg, this._peers)
}
return null