This commit is contained in:
Barış Soner Uşaklı
2018-05-31 15:05:12 -04:00
parent 4f4290b15d
commit b0dad9bd7f
9 changed files with 71 additions and 29 deletions

View File

@@ -67,6 +67,9 @@ chatsController.get = function (req, res, callback) {
roomId: req.params.roomid,
isNew: false,
}),
isAdminOrGlobalMod: function (next) {
user.isAdminOrGlobalMod(req.uid, next);
},
}, next);
},
function (data) {
@@ -89,7 +92,7 @@ chatsController.get = function (req, res, callback) {
room.maximumUsersInChatRoom = parseInt(meta.config.maximumUsersInChatRoom, 10) || 0;
room.maximumChatMessageLength = parseInt(meta.config.maximumChatMessageLength, 10) || 1000;
room.showUserInput = !room.maximumUsersInChatRoom || room.maximumUsersInChatRoom > 2;
room.isAdminOrGlobalMod = data.isAdminOrGlobalMod;
res.render('chats', room);
},
], callback);