diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-03 16:08:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-03 16:08:38 +0300 |
commit | 1ef4b90ce07ccc4e372f0b8179c69438bff24ae2 (patch) | |
tree | eb9cda4038333ff654e4da664325569d493c9648 /protocols/JabberG/src/jabber_iq_handlers.cpp | |
parent | ceb375ad7f99c4169ffb3041037583996122fa57 (diff) |
mime type standardization
Diffstat (limited to 'protocols/JabberG/src/jabber_iq_handlers.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 924b335afc..e532340acc 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -151,14 +151,9 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo) if (pictureType == PA_FORMAT_UNKNOWN)
return TRUE;
- wchar_t *szMimeType;
- switch (pictureType) {
- case PA_FORMAT_JPEG: szMimeType = L"image/jpeg"; break;
- case PA_FORMAT_GIF: szMimeType = L"image/gif"; break;
- case PA_FORMAT_PNG: szMimeType = L"image/png"; break;
- case PA_FORMAT_BMP: szMimeType = L"image/bmp"; break;
- default: return TRUE;
- }
+ const wchar_t *szMimeType = ProtoGetAvatarMimeType(pictureType);
+ if (szMimeType == NULL)
+ return TRUE;
wchar_t szFileName[MAX_PATH];
GetAvatarFileName(NULL, szFileName, _countof(szFileName));
|