summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-08-19 14:53:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-08-19 14:53:41 +0300
commitc28c6a82378e4830c32e17151890e7ffdbcab7ef (patch)
tree627fca7ba91b6d2a7dfb992968e23a2d1e7bb746 /protocols/ICQ-WIM/src
parentdac93be80d3ee76f81bfff81104fc9c591441c33 (diff)
fixes #2541 (Унифицировать показ стикера при отсутствии SmileyAdd)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 7ddec6f6e9..15d427fdea 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -459,17 +459,20 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
// is it a sticker?
if (pFileInfo->bIsSticker) {
- auto *pNew = new AsyncHttpRequest(CONN_NONE, REQUEST_GET, pFileInfo->szUrl, &CIcqProto::OnGetSticker);
- pNew->flags |= NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
- pNew->pUserInfo = wszUrl.GetBuffer();
- pNew->AddHeader("Sec-Fetch-User", "?1");
- pNew->AddHeader("Sec-Fetch-Site", "cross-site");
- pNew->AddHeader("Sec-Fetch-Mode", "navigate");
- if (!ExecuteRequest(pNew))
- return;
-
- wszText.Format(L"STK{%s}", wszUrl.c_str());
- delete pFileInfo;
+ if (ServiceExists(MS_SMILEYADD_LOADCONTACTSMILEYS)) {
+ auto *pNew = new AsyncHttpRequest(CONN_NONE, REQUEST_GET, pFileInfo->szUrl, &CIcqProto::OnGetSticker);
+ pNew->flags |= NLHRF_NODUMP | NLHRF_SSL | NLHRF_HTTP11 | NLHRF_REDIRECT;
+ pNew->pUserInfo = wszUrl.GetBuffer();
+ pNew->AddHeader("Sec-Fetch-User", "?1");
+ pNew->AddHeader("Sec-Fetch-Site", "cross-site");
+ pNew->AddHeader("Sec-Fetch-Mode", "navigate");
+ if (!ExecuteRequest(pNew))
+ return;
+
+ wszText.Format(L"STK{%s}", wszUrl.c_str());
+ delete pFileInfo;
+ }
+ else wszText = TranslateT("SmileyAdd plugin required to support stickers");
}
else {
// detach a file transfer