summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-26 21:15:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-26 21:15:35 +0300
commitfd1139fc1959a9988143839d3224778d9ce0bbdd (patch)
tree2fda5b4797ab0999eb9c49bc5df906925f057ae7 /protocols/JabberG
parent0bbad6b41fa7e5530d996194873e424962a54bac (diff)
Jabber: if we ignore roster, thy shalt update existing nicks either
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp10
-rwxr-xr-xprotocols/JabberG/src/jabber_iqid.cpp10
2 files changed, 12 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index 2761e53821..d29f87b706 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -218,10 +218,12 @@ bool CJabberProto::OnRosterPushRequest(const TiXmlElement*, CJabberIqInfo *pInfo
if (name != nullptr) {
ptrA tszNick(getUStringA(hContact, "Nick"));
if (tszNick != nullptr) {
- if (mir_strcmp(nick, tszNick) != 0)
- db_set_utf(hContact, "CList", "MyHandle", nick);
- else
- db_unset(hContact, "CList", "MyHandle");
+ if (!m_bIgnoreRoster) {
+ if (mir_strcmp(nick, tszNick) != 0)
+ db_set_utf(hContact, "CList", "MyHandle", nick);
+ else
+ db_unset(hContact, "CList", "MyHandle");
+ }
}
else db_set_utf(hContact, "CList", "MyHandle", nick);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 64fe8acbfc..a37df3e741 100755
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -423,10 +423,12 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo
if (name != nullptr) {
ptrA tszNick(getUStringA(hContact, "Nick"));
if (tszNick != nullptr) {
- if (mir_strcmp(nick, tszNick) != 0)
- db_set_utf(hContact, "CList", "MyHandle", nick);
- else
- db_unset(hContact, "CList", "MyHandle");
+ if (!m_bIgnoreRoster) {
+ if (mir_strcmp(nick, tszNick) != 0)
+ db_set_utf(hContact, "CList", "MyHandle", nick);
+ else
+ db_unset(hContact, "CList", "MyHandle");
+ }
}
else db_set_utf(hContact, "CList", "MyHandle", nick);
}