v1.18.x
Barış Soner Uşaklı 9 years ago
parent cbd936c547
commit 4e5d120763

@ -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]]'));
}

Loading…
Cancel
Save