diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-11 11:51:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-11 11:51:07 +0300 |
commit | c0c3c12b073078d50dd6c732d5ddba7aced46a91 (patch) | |
tree | 74adff070d551a2c80f9e196afd80f2e9fd0bb3d /protocols | |
parent | e461037d7941988ec2d6f83742dd10eb375a1578 (diff) |
Discord: fix for avatar file extension
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/avatars.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Discord/src/avatars.cpp b/protocols/Discord/src/avatars.cpp index d11409dae1..cc12cbb381 100644 --- a/protocols/Discord/src/avatars.cpp +++ b/protocols/Discord/src/avatars.cpp @@ -77,6 +77,7 @@ LBL_Error: goto LBL_Error; } + setByte(ai.hContact, "AvatarType", ai.format); mir_wstrncpy(ai.filename, GetAvatarFilename(ai.hContact), _countof(ai.filename)); FILE *out = _wfopen(ai.filename, L"wb"); @@ -101,7 +102,7 @@ bool CDiscordProto::RetrieveAvatar(MCONTACT hContact) if (id == 0 || szAvatarHash == nullptr) return false; - CMStringA szUrl(FORMAT, "https://cdn.discordapp.com/avatars/%lld/%s.jpg", id, szAvatarHash); + CMStringA szUrl(FORMAT, "https://cdn.discordapp.com/avatars/%lld/%s.jpg", id, szAvatarHash.get()); AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveAvatar); pReq->pUserInfo = (void*)hContact; Push(pReq); |