summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-08-19 15:15:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-08-19 15:15:20 +0300
commitb303e45693776387a11d4fc2735640a1b78dda66 (patch)
treeafcb65992fbda0477338271a6ba6ac5ab7f69dad
parent7b9f4e2adf4fda8d81cc6c92a4299186455967bd (diff)
fixes #4574 (Skypeweb: странное поведение оффлайн-файла (картинки))
-rw-r--r--protocols/SkypeWeb/src/skype_files.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp
index ee9ace0407..e7cb709898 100644
--- a/protocols/SkypeWeb/src/skype_files.cpp
+++ b/protocols/SkypeWeb/src/skype_files.cpp
@@ -27,10 +27,10 @@ void CSkypeProto::ReceiveFileThread(void *param)
else {
CMStringA szCookie, szUrl;
szCookie.AppendFormat("skypetoken_asm=%s", m_szApiToken.get());
+
+ auto &json = dbei.getJson();
+ auto skft = json["skft"].as_string();
{
- auto &json = dbei.getJson();
- auto skft = json["skft"].as_string();
-
const char *preview;
if (skft == "Picture.1")
preview = "imgpsh_mobile_save_anim";
@@ -60,7 +60,14 @@ void CSkypeProto::ReceiveFileThread(void *param)
if (!szUrl.IsEmpty()) {
MHttpRequest nlhr(REQUEST_GET);
nlhr.flags = NLHRF_HTTP11 | NLHRF_NOUSERAGENT;
- nlhr.m_szUrl = szUrl;
+ nlhr.m_szUrl = blob.getUrl();
+ if (skft == "Picture.1")
+ nlhr.m_szUrl += "/views/imgpsh_fullsize_anim";
+ else if (skft == "Video.1")
+ nlhr.m_szUrl += "/views/video";
+ else
+ nlhr.m_szUrl += "/views/original";
+
nlhr.AddHeader("Accept", "*/*");
nlhr.AddHeader("Accept-Encoding", "gzip, deflate");
nlhr.AddHeader("Cookie", szCookie);