mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
fix: #11541, fix leave chat error
This commit is contained in:
@@ -175,9 +175,9 @@ chatsAPI.kick = async (caller, data) => {
|
||||
// Additional checks if kicking vs leaving
|
||||
if (data.uids.length === 1 && parseInt(data.uids[0], 10) === caller.uid) {
|
||||
await messaging.leaveRoom([caller.uid], data.roomId);
|
||||
} else {
|
||||
await messaging.removeUsersFromRoom(caller.uid, data.uids, data.roomId);
|
||||
return [];
|
||||
}
|
||||
await messaging.removeUsersFromRoom(caller.uid, data.uids, data.roomId);
|
||||
|
||||
delete data.uids;
|
||||
return chatsAPI.users(caller, data);
|
||||
|
||||
Reference in New Issue
Block a user