diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-10 13:56:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-10 13:56:57 +0300 |
commit | 5e9e97571ebf41809724119a767e07995928ede0 (patch) | |
tree | 5059f84192213c10378f73817deff54b41f1adb3 | |
parent | 6f18b6ae2f022b1325b0f201da75a60600d0009b (diff) |
Jabber: fix for some weird problems with groupchats
-rw-r--r-- | protocols/JabberG/src/jabber_list.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index d41a06ea57..badc48eb15 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -90,16 +90,17 @@ void JABBER_RESOURCE_STATUS::Release() void CJabberProto::ListInit(void)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (isChatRoom(hContact)) {
- ptrW jid(getWStringA(hContact, "ChatRoomID"));
- if (jid != nullptr)
- ListAdd(LIST_CHATROOM, jid, hContact);
- }
- else {
- ptrW jid(getWStringA(hContact, "jid"));
- if (jid != nullptr)
- ListAdd(LIST_ROSTER, jid, hContact);
- }
+ if (!isChatRoom(hContact)) continue;
+ ptrW jid(getWStringA(hContact, "ChatRoomID"));
+ if (jid != nullptr)
+ ListAdd(LIST_CHATROOM, jid, hContact);
+ }
+
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ if (isChatRoom(hContact)) continue;
+ ptrW jid(getWStringA(hContact, "jid"));
+ if (jid != nullptr)
+ ListAdd(LIST_ROSTER, jid, hContact);
}
}
|