From ef67665f58eef0335add7e722d8ae4663b069a17 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 12 Nov 2020 11:07:36 -0300 Subject: [PATCH] [FIX] Notification stream throwing an error when there isn't a message on payload (#2637) --- app/lib/methods/subscriptions/rooms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/methods/subscriptions/rooms.js b/app/lib/methods/subscriptions/rooms.js index 6f3b3e21a..997ea0a1a 100644 --- a/app/lib/methods/subscriptions/rooms.js +++ b/app/lib/methods/subscriptions/rooms.js @@ -355,7 +355,7 @@ export default function subscribeRooms() { notification.avatar = RocketChat.getRoomAvatar(room); // If it's from a encrypted room - if (message.t === E2E_MESSAGE_TYPE) { + if (message?.t === E2E_MESSAGE_TYPE) { // Decrypt this message content const { msg } = await Encryption.decryptMessage({ ...message, rid }); // If it's a direct the content is the message decrypted