Use new nio AsyncClient.mxc_to_http()

Has the correct behavior for all servers,
e.g. mxc://privacytoosl.io/id → https://chat.privacytools.io/...
This commit is contained in:
miruka
2019-12-02 06:42:48 -04:00
parent 3919b964ca
commit 26e63e4ab2
4 changed files with 6 additions and 14 deletions

View File

@@ -57,7 +57,8 @@ HMxcImage {
let isMxc = toOpen.startsWith("mxc://")
isMxc ?
py.callCoro("mxc_to_http", [toOpen], callback) : callback(toOpen)
py.callClientCoro(chatPage.userId, "mxc_to_http", [toOpen], callback) :
callback(toOpen)
}