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.
v1.18.x
Julian Lam 6 years ago
parent cd80c2638c
commit 0e8ee31b90

@ -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",

@ -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) {

Loading…
Cancel
Save