From d5d66b8a85c970595e28a01877844dc0a65e2003 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 9 Mar 2023 13:23:25 +0300 Subject: fixes #3412 (Jabber: If no nick for room in Bookmarks Miranda uses user ID as nick) --- protocols/JabberG/src/jabber_iqid.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'protocols/JabberG/src/jabber_iqid.cpp') 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); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3