summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_iqid.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-09 13:23:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-09 13:23:25 +0300
commitd5d66b8a85c970595e28a01877844dc0a65e2003 (patch)
tree711b542f5d2836b412821eebec03fa8f8a67fa77 /protocols/JabberG/src/jabber_iqid.cpp
parentb95dc7e61ba02fdd12b1c11142db6c7aebfffd53 (diff)
fixes #3412 (Jabber: If no nick for room in Bookmarks Miranda uses user ID as nick)
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 3cd1fb27c1..99375fb286 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -236,13 +236,7 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, uint32_t rq)
if (item->nick && item->nick[0])
GroupchatJoinRoom(server, p, item->nick, item->password, true);
else {
- ptrA nick(getUStringA(HContactFromJID(m_szJabberJID), "MyNick"));
- if (nick == nullptr)
- nick = getUStringA("Nick");
- if (nick == nullptr)
- nick = JabberNickFromJID(m_szJabberJID);
-
- GroupchatJoinRoom(server, p, nick, item->password, true);
+ GroupchatJoinRoom(server, p, MyNick(HContactFromJID(m_szJabberJID)), item->password, true);
}
}
}
@@ -434,14 +428,7 @@ void CJabberProto::GroupchatJoinByHContact(MCONTACT hContact, bool autojoin)
server[0] = 0; server++;
- ptrA nick(getUStringA(hContact, "MyNick"));
- if (nick == nullptr) {
- nick = JabberNickFromJID(m_szJabberJID);
- if (nick == nullptr)
- return;
- }
-
- GroupchatJoinRoom(server, room, nick, ptrA(getUStringA(hContact, "Password")), autojoin);
+ GroupchatJoinRoom(server, room, MyNick(hContact), ptrA(getUStringA(hContact, "Password")), autojoin);
}
/////////////////////////////////////////////////////////////////////////////////////////