[FIX] Notification stream throwing an error when there isn't a message on payload (#2637)

This commit is contained in:
Djorkaeff Alexandre 2020-11-12 11:07:36 -03:00 committed by GitHub
parent 31ae5dab36
commit ef67665f58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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