summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_files.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-08-14 21:08:13 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-08-14 21:08:13 +0300
commit0b391df2006b89b5ea9df1115dc695e5f44c26ce (patch)
treeb03be693ad5456f1fd42cd38266dfa093ed7368d /protocols/SkypeWeb/src/skype_files.cpp
parentf41cd01eae037b3021039e68dd37234126037ea8 (diff)
fixes #4573 (Skypeweb: видео не принимается как файл)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_files.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_files.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp
index 2d6bd2c163..ee9ace0407 100644
--- a/protocols/SkypeWeb/src/skype_files.cpp
+++ b/protocols/SkypeWeb/src/skype_files.cpp
@@ -30,11 +30,19 @@ void CSkypeProto::ReceiveFileThread(void *param)
{
auto &json = dbei.getJson();
auto skft = json["skft"].as_string();
+
+ const char *preview;
+ if (skft == "Picture.1")
+ preview = "imgpsh_mobile_save_anim";
+ else if (skft == "Video.1")
+ preview = "video";
+ else
+ preview = "original";
MHttpRequest nlhr(REQUEST_GET);
nlhr.flags = NLHRF_HTTP11 | NLHRF_NOUSERAGENT;
nlhr.m_szUrl = blob.getUrl();
- nlhr.m_szUrl.AppendFormat("/views/%s/status", skft == "Picture.1" ? "imgpsh_mobile_save_anim" : "original");
+ nlhr.m_szUrl.AppendFormat("/views/%s/status", preview);
nlhr.AddHeader("Accept", "*/*");
nlhr.AddHeader("Accept-Encoding", "gzip, deflate");
nlhr.AddHeader("Cookie", szCookie);