diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_iqid.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 099b8b8d7f..af2f459959 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -598,7 +598,14 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP if (buffer == nullptr)
return;
- const wchar_t *szPicType = JabberGetPictureType(n, buffer);
+ const wchar_t *szPicType = nullptr;
+ if (const wchar_t *ptszType = XmlGetText(XmlGetChild(n, "TYPE")))
+ if (ProtoGetAvatarFormatByMimeType(ptszType) != PA_FORMAT_UNKNOWN)
+ szPicType = ptszType;
+
+ if (szPicType == nullptr)
+ szPicType = ProtoGetAvatarMimeType(ProtoGetBufferFormat(buffer));
+
if (szPicType == nullptr)
return;
|