diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-26 16:09:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-26 16:09:08 +0000 |
commit | 370d627df54c0b0823a1739176e0157c0205b692 (patch) | |
tree | 79b4a899b2cc8f6dc880a6993097b19c125dfb7f | |
parent | fb73b61dcfd05b72d6beb14bd35a9d1b2b529838 (diff) |
fixes bug #1251 (Autologin into Jabber conference executed without correct nickname)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16873 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 9 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 11 |
2 files changed, 17 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 961776b08a..5f15f762f1 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -1208,7 +1208,14 @@ void CJabberProto::GroupchatProcessInvite(const TCHAR *roomJid, const TCHAR *fro inviteInfo->password = mir_tstrdup(password);
ForkThread((MyThreadFunc)&CJabberProto::GroupchatInviteAcceptThread, inviteInfo);
}
- else AcceptGroupchatInvite(roomJid, ptrT(JabberNickFromJID(m_szJabberJID)), password);
+ else {
+ ptrT nick(getTStringA(HContactFromJID(m_szJabberJID), "MyNick"));
+ if (nick == NULL)
+ nick = getTStringA("Nick");
+ if (nick == NULL)
+ nick = JabberNickFromJID(m_szJabberJID);
+ AcceptGroupchatInvite(roomJid, nick, password);
+ }
}
void CJabberProto::AcceptGroupchatInvite(const TCHAR *roomJid, const TCHAR *reason, const TCHAR *password)
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 5bd0913292..aa46c9e544 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -148,8 +148,15 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) TCHAR *server = _tcstok(NULL, _T("@"));
if (item->nick && item->nick[0])
GroupchatJoinRoom(server, p, item->nick, item->password, true);
- else
- GroupchatJoinRoom(server, p, ptrT(JabberNickFromJID(m_szJabberJID)), item->password, true);
+ else {
+ ptrT nick(getTStringA(HContactFromJID(m_szJabberJID), "MyNick"));
+ if (nick == NULL)
+ nick = getTStringA("Nick");
+ if (nick == NULL)
+ nick = JabberNickFromJID(m_szJabberJID);
+
+ GroupchatJoinRoom(server, p, nick, item->password, true);
+ }
}
}
|