diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-27 16:54:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-27 16:54:25 +0300 |
commit | c6f19f056032de76565d097986d16db77b065a03 (patch) | |
tree | 634cb217ab7f0d65ba6d85be5e26a00038d50046 /protocols/JabberG | |
parent | 49e856bee9b637156e659dcf0e65180dd5a4e077 (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-x | protocols/JabberG/src/jabber_util.cpp | 12 |
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) {
|