From ffeac380348a8d617981c99c4b2f23192f8197c3 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 1 Nov 2019 14:34:35 -0300 Subject: [PATCH] [FIX] URL preview (#1360) --- app/lib/methods/subscriptions/rooms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/methods/subscriptions/rooms.js b/app/lib/methods/subscriptions/rooms.js index b5d96858b..f2ae92e45 100644 --- a/app/lib/methods/subscriptions/rooms.js +++ b/app/lib/methods/subscriptions/rooms.js @@ -123,8 +123,8 @@ const createOrUpdateSubscription = async(subscription, room) => { ); } - if (sub.lastMessage) { - const lastMessage = buildMessage(sub.lastMessage); + if (tmp.lastMessage) { + const lastMessage = buildMessage(tmp.lastMessage); const messagesCollection = db.collections.get('messages'); let messageRecord; try {