From 0e8ee31b90fa086ab71529db272e03c990827295 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 16 Jul 2019 15:10:33 -0400 Subject: [PATCH] fix: #7601 removed check for another user when sending messages This is an old check back when the sorted set that messages were appended to depended on what users were in the chat room. Once messages were refactored (in 2017) to use roomIds, this is no longer a limitation of the platform and users should be free to talk to themselves all they want. --- public/language/en-GB/error.json | 1 - src/messaging/index.js | 7 ------- 2 files changed, 8 deletions(-) diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json index 072fbdcc88..fb2951e188 100644 --- a/public/language/en-GB/error.json +++ b/public/language/en-GB/error.json @@ -173,7 +173,6 @@ "no-session-found": "No login session found!", "not-in-room": "User not in room", - "no-users-in-room": "No users in this room", "cant-kick-self": "You can't kick yourself from the group", "no-users-selected": "No user(s) selected", "invalid-home-page-route": "Invalid home page route", diff --git a/src/messaging/index.js b/src/messaging/index.js index d6724cacd2..078d660ddc 100644 --- a/src/messaging/index.js +++ b/src/messaging/index.js @@ -344,13 +344,6 @@ Messaging.canMessageRoom = function (uid, roomId, callback) { return next(new Error('[[error:not-in-room]]')); } - Messaging.getUserCountInRoom(roomId, next); - }, - function (count, next) { - if (count < 2) { - return next(new Error('[[error:no-users-in-room]]')); - } - user.getUserFields(uid, ['banned', 'email:confirmed'], next); }, function (userData, next) {