From 6aec61d7227b73b49f30ea912dcab5f299f240f9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 30 Sep 2016 19:39:08 +0300 Subject: [PATCH] groupChat on recentChats --- src/messaging.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/messaging.js b/src/messaging.js index 2bad43ce79..d3809c9676 100644 --- a/src/messaging.js +++ b/src/messaging.js @@ -288,6 +288,7 @@ var async = require('async'), results.roomData.forEach(function(room, index) { room.users = results.users[index]; + room.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : room.users.length > 2; room.unread = results.unread[index]; room.teaser = results.teasers[index]; @@ -329,9 +330,9 @@ var async = require('async'), return callback(); } if (teaser.content) { - teaser.content = S(teaser.content).stripTags().decodeHTMLEntities().s; + teaser.content = S(teaser.content).stripTags().decodeHTMLEntities().s; } - + teaser.timestampISO = utils.toISOString(teaser.timestamp); user.getUserFields(teaser.fromuid, ['uid', 'username', 'userslug', 'picture', 'status', 'lastonline'] , next); },