From e9214862fe37191d956188ff64aef89330ebbf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 2 Jul 2019 18:10:35 +0200 Subject: [PATCH] buffer: Pass the homeserver to the mxc -> http api function. This fixes #57. --- matrix/buffer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index 188326a..279c12d 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -1376,7 +1376,7 @@ class RoomBuffer(object): elif isinstance(event, RoomMessageMedia): nick = self.find_nick(event.sender) date = server_ts_to_weechat(event.server_timestamp) - http_url = Api.mxc_to_http(event.url) + http_url = Api.mxc_to_http(event.url, self.homeserver.geturl()) url = http_url if http_url else event.url description = "/{}".format(event.body) if event.body else "" @@ -1396,7 +1396,8 @@ class RoomBuffer(object): event.url, event.key["k"], event.hashes["sha256"], - event.iv + event.iv, + self.homeserver.geturl() ) url = http_url if http_url else event.url