mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
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.
This commit is contained in:
@@ -173,7 +173,6 @@
|
|||||||
|
|
||||||
"no-session-found": "No login session found!",
|
"no-session-found": "No login session found!",
|
||||||
"not-in-room": "User not in room",
|
"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",
|
"cant-kick-self": "You can't kick yourself from the group",
|
||||||
"no-users-selected": "No user(s) selected",
|
"no-users-selected": "No user(s) selected",
|
||||||
"invalid-home-page-route": "Invalid home page route",
|
"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]]'));
|
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);
|
user.getUserFields(uid, ['banned', 'email:confirmed'], next);
|
||||||
},
|
},
|
||||||
function (userData, next) {
|
function (userData, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user