summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-21 11:40:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-21 11:40:35 +0300
commita46d893e212c2948811b10a6ac84b0150efa09dd (patch)
tree40a6b5bec8d4226dc96839ff138b918e89b7e83d
parent52195adb1cbd740d7e68871471e49a3dfb6334d0 (diff)
fixes #3116 (Jabber: удаление комнаты из списка контактов не позволяет зайти в неё снова)
-rw-r--r--protocols/JabberG/src/jabber_events.cpp3
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp10
2 files changed, 4 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index d2a863bfa5..ed4976e769 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -55,9 +55,6 @@ void CJabberProto::OnContactDeleted(MCONTACT hContact)
ListRemove(LIST_ROSTER, jid);
}
-
- if (isChatRoom(hContact))
- ListRemove(LIST_CHATROOM, jid);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 82147b8d1a..81f432bc0f 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -206,13 +206,11 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM hContact, LPARAM)
INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM hContact, LPARAM)
{
ptrA jid(ContactToJID(hContact));
- if (jid != nullptr) {
- if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
- JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid);
- if (item != nullptr)
+ if (jid != nullptr)
+ if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE)
+ if (JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid))
GcQuit(item, 200, nullptr);
- }
- }
+
return 0;
}