aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-06-17 19:30:29 +0200
committerdec05eba <dec05eba@protonmail.com>2025-06-17 19:30:29 +0200
commit48d0a1ae1f486f079f4416d1ae1ab92ad1b15ced (patch)
tree3e38209a1a8d26be63551eaa9fe748d7bd0a9644 /src
parent3bf44ddaf473ccd8dfc7b5bb268e8ef02c96fd92 (diff)
Matrix: fix emoji uploadHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Matrix.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 5817fe3..c810d88 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -5101,7 +5101,10 @@ namespace QuickMedia {
remote_homeserver_url = get_remote_homeserver_url();
char url[512];
- snprintf(url, sizeof(url), "%s/_matrix/media/r0/upload?filename=%s", remote_homeserver_url.c_str(), filename_escaped.c_str());
+ snprintf(url, sizeof(url), "%s%s_matrix/media/r0/upload?filename=%s",
+ remote_homeserver_url.c_str(),
+ !remote_homeserver_url.empty() && remote_homeserver_url.back() == '/' ? "" : "/",
+ filename_escaped.c_str());
rapidjson::Document json_root;
DownloadResult download_result = download_json(json_root, url, std::move(additional_args), true, &err_msg);