Delete chat (one/both side)

This commit is contained in:
2025-08-02 23:58:02 +03:30
parent 3cdbb7e24b
commit 364e675bf7
4 changed files with 13 additions and 15 deletions
@@ -2181,8 +2181,7 @@ public class ClientHandler implements Runnable {
return new ResponseModel("error", "Unauthorized");
UUID chatId = UUID.fromString(json.getString("chat_id"));
boolean bothSides = json.optBoolean("both_sides", false);
boolean bothSides = json.optBoolean("both_sides", json.optBoolean("both", false));
PrivateChat chat = PrivateChatDatabase.findById(chatId);
if (chat == null) return new ResponseModel("error", "Chat not found.");