From 3f126f88e0fce515384655bfdf382b653fc5f159 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 31 Mar 2024 17:47:17 +0300 Subject: fixes #4314 (Jabber: duplicate contacts in roster) --- protocols/JabberG/src/jabber_list.cpp | 3 +++ protocols/JabberG/src/jabber_proto.cpp | 2 ++ 2 files changed, 5 insertions(+) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index ad4c905a66..7c2292106e 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -88,6 +88,9 @@ void JABBER_RESOURCE_STATUS::Release() void CJabberProto::ListInit(void) { + if (m_lstRoster.getCount()) + return; + for (auto &hContact : AccContacts()) { ptrA jid(ContactToJID(hContact)); if (jid != nullptr) diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 40dcd35e69..0f038b9344 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -239,6 +239,8 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : m_tszSelectedLang = mir_strdup("en"); g_plugin.addPopupOption(CMStringW(FORMAT, TranslateT("%s error notifications"), m_tszUserName), m_bUsePopups); + + ListInit(); } CJabberProto::~CJabberProto() -- cgit v1.2.3