fix(core): handle no dialog in conversation

This commit is contained in:
alina 🌸 2024-05-30 16:58:52 +03:00
parent dcd757ec5e
commit 974739f2d5
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -171,7 +171,8 @@ export class Conversation {
this._chatId = getMarkedPeerId(this._inputPeer)
const [dialog] = await getPeerDialogs(this.client, this._inputPeer)
const lastMessage = dialog.lastMessage
const lastMessage = dialog?.lastMessage
if (lastMessage) {
this._lastMessage = this._lastReceivedMessage = lastMessage.id