Skip to content

Node.js based forum software built for the modern web

closes #5142

Barış Soner Uşaklı4e5d12076392
diff --git a/src/socket.io/modules.js b/src/socket.io/modules.js
index 011a68567f..263ff76a29 100644
--- a/src/socket.io/modules.js
+++ b/src/socket.io/modules.js
@@ -166,12 +166,12 @@ SocketModules.chats.addUserToRoom = function (socket, data, callback) {
}
async.parallel({
settings: async.apply(user.getSettings, uid),
- isAdmin: async.apply(user.isAdministrator, socket.uid),
+ isAdminOrGlobalMod: async.apply(user.isAdminOrGlobalMod, socket.uid),
isFollowing: async.apply(user.isFollowing, uid, socket.uid)
}, next);
},
function (results, next) {
- if (results.settings.restrictChat && !results.isAdmin && !results.isFollowing) {
+ if (results.settings.restrictChat && !results.isAdminOrGlobalMod && !results.isFollowing) {
return next(new Error('[[error:chat-restricted]]'));
}