server: fix init client

This commit is contained in:
Reto Brunner 2024-04-01 22:45:58 +02:00
parent 46f3fd9682
commit 60486bf5e3

View file

@ -640,13 +640,13 @@ function initializeClient(
return;
}
const message = networkAndChan.chan.findMessage(data.msgId);
const message = data.msgId ? networkAndChan.chan.findMessage(data.msgId) : null;
if (!message) {
return;
}
const preview = message.findPreview(data.link);
const preview = data.link ? message.findPreview(data.link) : null;
if (preview) {
preview.shown = newState;