Fixed join channel and group bugs
This commit is contained in:
@@ -85,15 +85,16 @@ public class ActionHandler {
|
||||
}
|
||||
|
||||
|
||||
private void joinGroupOrChannel(String type, String id) {
|
||||
private void joinGroupOrChannel(String type, String uuid) {
|
||||
JSONObject req = new JSONObject();
|
||||
req.put("action", "join_" + type);
|
||||
req.put("user_id", Session.currentUser.getString("user_id"));
|
||||
req.put("id", id);
|
||||
req.put("user_id", Session.currentUser.getString("internalUUID")); // ✅ internal_uuid لازم است
|
||||
req.put("id", uuid); // ✅ این هم internal_uuid است
|
||||
send(req);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private ChatEntry fetchChatInfo(String receiverId, String receiverType) {
|
||||
JSONObject req = new JSONObject();
|
||||
req.put("action", "get_chat_info");
|
||||
@@ -312,12 +313,13 @@ public class ActionHandler {
|
||||
} else {
|
||||
joinGroupOrChannel(type, uuid);
|
||||
|
||||
ChatEntry newChat = fetchChatInfo(uuid, type);
|
||||
ChatEntry newChat = fetchChatInfo(id, type);
|
||||
refreshChatList();
|
||||
openChat(newChat);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case "message" -> {
|
||||
String receiverId = selected.getString("receiver_id");
|
||||
String receiverType = selected.getString("receiver_type");
|
||||
|
||||
Reference in New Issue
Block a user