Use resolve for homeserver, fixing trailing slash issues

This commit is contained in:
Henry Hiles 2026-03-27 23:10:15 -04:00
commit ab61338382
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -1,4 +1,5 @@
extension MxcToHttps on Uri { extension MxcToHttps on Uri {
Uri mxcToHttps(String homeserver) => Uri mxcToHttps(String homeserver) => Uri.parse(
Uri.parse("${homeserver}_matrix/client/v1/media/download/$host$path"); homeserver,
).resolve("_matrix/client/v1/media/download/$host$path");
} }