Fixed save message

This commit is contained in:
2025-08-11 21:29:34 +03:30
parent 42d98c53d8
commit 8277681431
@@ -2120,6 +2120,15 @@ public class ClientHandler implements Runnable {
userId = currentUser.getInternal_uuid();
UUID targetId = PrivateChatDatabase.getOtherUserInChat(chatId, userId);
if (targetId == null) {
PrivateChat chat = PrivateChatDatabase.findById(chatId);
if (chat != null
&& (userId.equals(chat.getUser1_id()) || userId.equals(chat.getUser2_id()))
&& chat.getUser1_id().equals(chat.getUser2_id())) {
targetId = userId;
}
}
if (targetId == null) {
response = new ResponseModel("error", "Could not find other user.");
} else {