This commit is contained in:
Julian Lam
2018-07-24 10:30:47 -04:00
parent c1e98eefa7
commit 506467ad6f
3 changed files with 12 additions and 3 deletions

View File

@@ -229,6 +229,14 @@ module.exports = function (Messaging) {
function (uids, next) {
user.getUsersFields(uids, ['uid', 'username', 'picture', 'status'], next);
},
function (users, next) {
db.getObjectField('chat:room:' + roomId, 'owner', function (err, ownerId) {
next(err, users.map(function (user) {
user.isOwner = parseInt(user.uid, 10) === parseInt(ownerId, 10);
return user;
}));
});
},
], callback);
};