summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_util.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 3e3e393d05..a8cd4b5adc 100755
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -452,9 +452,13 @@ void CJabberProto::SendPresenceTo(int status, const wchar_t* to, HXML extra, con
if (m_bEnableAvatars) {
HXML x = p << XCHILDNS(L"x", L"vcard-temp:x:update");
- ptrA hashValue(getStringA("AvatarHash"));
+ ptrW vcardHash(getWStringA("VCardHash"));
+ if (vcardHash != nullptr)
+ x << XATTR(L"vcard", vcardHash);
+
+ ptrW hashValue(getWStringA("AvatarHash"));
if (hashValue != nullptr) // XEP-0153: vCard-Based Avatars
- x << XCHILD(L"photo", _A2T(hashValue));
+ x << XCHILD(L"photo", hashValue);
else
x << XCHILD(L"photo");
}