aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index bbe9897..6050b18 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1740,16 +1740,12 @@ namespace QuickMedia {
static std::string message_content_extract_thumbnail_url(const rapidjson::Value &content_json, const std::string &homeserver) {
const rapidjson::Value &info_json = GetMember(content_json, "info");
if(info_json.IsObject()) {
- sf::Vector2i thumbnail_size;
- if(!message_content_extract_thumbnail_size(content_json, thumbnail_size))
- return "";
-
const rapidjson::Value &thumbnail_url_json = GetMember(info_json, "thumbnail_url");
if(thumbnail_url_json.IsString()) {
std::string thumbnail_str = thumbnail_url_json.GetString();
if(strncmp(thumbnail_str.c_str(), "mxc://", 6) == 0) {
thumbnail_str.erase(thumbnail_str.begin(), thumbnail_str.begin() + 6);
- return homeserver + "/_matrix/media/r0/thumbnail/" + std::move(thumbnail_str) + "?width=" + std::to_string(thumbnail_size.x) + "&height=" + std::to_string(thumbnail_size.y);
+ return homeserver + "/_matrix/media/r0/download/" + std::move(thumbnail_str);
}
}
}