Node.js based forum software built for the modern web
closes #6303
Barış Soner Uşaklıb86c4b307337
diff --git a/src/messaging.js b/src/messaging.jsindex 9ceda65b7d..1c8289b5b8 100644--- a/src/messaging.js+++ b/src/messaging.js@@ -265,11 +265,12 @@ Messaging.canMessageUser = function (uid, toUid, callback) {async.parallel({settings: async.apply(user.getSettings, toUid),isAdmin: async.apply(user.isAdministrator, uid),+ isModerator: async.apply(user.isModeratorOfAnyCategory, uid),isFollowing: async.apply(user.isFollowing, toUid, uid),}, next);},function (results, next) {- if (results.settings.restrictChat && !results.isAdmin && !results.isFollowing) {+ if (results.settings.restrictChat && !results.isAdmin && !results.isModerator && !results.isFollowing) {return next(new Error('[[error:chat-restricted]]'));}