summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp9
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp11
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);
+ }
}
}