Node.js based forum software built for the modern web
fix: #11541, fix leave chat error
Barış Soner Uşaklı8e0f9ce573b8
diff --git a/src/api/chats.js b/src/api/chats.jsindex 9f320d764e..2e7fe6dfd7 100644--- a/src/api/chats.js+++ b/src/api/chats.js@@ -175,9 +175,9 @@ chatsAPI.kick = async (caller, data) => {// Additional checks if kicking vs leavingif (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);