summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-02 13:59:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-02 13:59:44 +0300
commitfca333eaf95189a2029fef0d91d52c572164ea0d (patch)
treeaf43204791f6de4c3cc2b447e6bb3afbe58a5267
parent28895567e575d5a017a1d1dcb8f2720fb1d0665f (diff)
Jabber: fix for vcard retrieving problem for groupchat contacts with cyrillic nicks
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 80674a1625..e9ec8262d4 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -35,18 +35,20 @@ int CJabberProto::SendGetVcard(MCONTACT hContact)
{
if (!m_bJabberOnline) return 0;
- CMStringA jid;
+ CJabberIqInfo *pInfo;
+
if (hContact == 0) {
- jid = m_szJabberJID;
setDword("LastGetVcard", time(0));
+ pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, m_szJabberJID);
}
else {
- jid = getMStringA(hContact, "jid");
- if (jid.IsEmpty())
+ ptrA jid(getUStringA(hContact, "jid"));
+ if (jid == nullptr)
return -1;
+
+ pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid);
}
- CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid);
m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS("vCard", JABBER_FEAT_VCARD_TEMP)
<< XATTR("prodid", "-//HandGen//NONSGML vGen v1.0//EN") << XATTR("version", "2.0"));