diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2017-04-17 17:36:58 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dave@treblig.org> | 2017-04-17 17:54:28 +0100 |
commit | ceec85597aef96b4bd8b952fee20a7ceab63c0be (patch) | |
tree | 803c87810ecb59936353cac7f85720e4117956c8 | |
parent | 00c43fe672ef7acd497bad1dc89ec8f5b4172eb3 (diff) | |
download | purple-matrix-ceec85597aef96b4bd8b952fee20a7ceab63c0be.tar.gz |
Fix image download
I had an extra / after the hostname, and it doesn't need the access
key.
(Interestingly my server would take the extra / but matrix.org wouldn't)
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
-rw-r--r-- | matrix-api.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/matrix-api.c b/matrix-api.c index 9cd7670..3bc1b00 100644 --- a/matrix-api.c +++ b/matrix-api.c @@ -875,10 +875,8 @@ MatrixApiRequestData *matrix_api_download_file(MatrixConnectionData *conn, return NULL; } url = g_string_new(conn->homeserver); - g_string_append(url, "/_matrix/media/r0/download/"); + g_string_append(url, "_matrix/media/r0/download/"); g_string_append(url, uri + 6); /* i.e. after the mxc:// */ - g_string_append(url, "?access_token="); - g_string_append(url, purple_url_encode(conn->access_token)); /* I'd like to validate the headers etc a bit before downloading the * data (maybe using _handle_header_completed), also I'm not convinced |