From 5e9e97571ebf41809724119a767e07995928ede0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Sep 2017 13:56:57 +0300 Subject: Jabber: fix for some weird problems with groupchats --- protocols/JabberG/src/jabber_list.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'protocols') 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); } } -- cgit v1.2.3