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; return;
} }
const message = networkAndChan.chan.findMessage(data.msgId); const message = data.msgId ? networkAndChan.chan.findMessage(data.msgId) : null;
if (!message) { if (!message) {
return; return;
} }
const preview = message.findPreview(data.link); const preview = data.link ? message.findPreview(data.link) : null;
if (preview) { if (preview) {
preview.shown = newState; preview.shown = newState;