summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-27 16:54:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-27 16:54:25 +0300
commitc6f19f056032de76565d097986d16db77b065a03 (patch)
tree634cb217ab7f0d65ba6d85be5e26a00038d50046 /protocols/JabberG
parent49e856bee9b637156e659dcf0e65180dd5a4e077 (diff)
Jabber: if we ignore roster nicks, we don't apply them when local CList/MyHandle isn't empty
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 0e02fe260a..aa64fb68e7 100755
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -78,19 +78,19 @@ CMStringA MakeJid(const char *jid, const char *resource)
void CJabberProto::UpdateItem(JABBER_LIST_ITEM *pItem, const char *name)
{
- if (name != nullptr) {
- ptrA tszNick(getUStringA(pItem->hContact, "Nick"));
- if (tszNick != nullptr) {
- if (!m_bIgnoreRoster) {
+ if (!m_bIgnoreRoster || db_get_wsm(pItem->hContact, "CList", "MyHandle").IsEmpty()) {
+ if (name != nullptr) {
+ ptrA tszNick(getUStringA(pItem->hContact, "Nick"));
+ if (tszNick != nullptr) {
if (mir_strcmp(pItem->nick, tszNick) != 0)
db_set_utf(pItem->hContact, "CList", "MyHandle", pItem->nick);
else
db_unset(pItem->hContact, "CList", "MyHandle");
}
+ else db_set_utf(pItem->hContact, "CList", "MyHandle", pItem->nick);
}
- else db_set_utf(pItem->hContact, "CList", "MyHandle", pItem->nick);
+ else db_unset(pItem->hContact, "CList", "MyHandle");
}
- else db_unset(pItem->hContact, "CList", "MyHandle");
// check group delimiters
if (pItem->group && m_szGroupDelimiter) {