summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-05-20 16:20:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-05-20 16:20:23 +0300
commite5ab71aebf01a16885b4f1500fe0d15a66cad682 (patch)
tree60b6cc3c136757fff3de6ddfec17b687a0216fa6
parent4afc9cf3790fc60aaf2b41d269fd805cc8707230 (diff)
Jabber: fix for MyNick processing in group chats
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 2160784660..17b824d84b 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -130,14 +130,11 @@ SESSION_INFO* CJabberProto::GcInit(JABBER_LIST_ITEM *item)
}
}
- ptrA tszNick(getUStringA(si->hContact, "MyNick"));
- if (tszNick != nullptr) {
- if (!mir_strcmp(tszNick, szNick))
- delSetting(si->hContact, "MyNick");
- else
- setUString(si->hContact, "MyNick", item->nick);
- }
- else setUString(si->hContact, "MyNick", item->nick);
+ ptrA szMyNick(getUStringA(si->hContact, "MyNick"));
+ if (szMyNick && getMStringU("Nick") == szMyNick)
+ delSetting(si->hContact, "MyNick");
+ else
+ setUString(si->hContact, "MyNick", item->nick);
ptrA passw(getUStringA(si->hContact, "Password"));
if (mir_strcmp(passw, item->password)) {