aboutsummaryrefslogtreecommitdiff
path: root/matrix/matrix.go
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r--matrix/matrix.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 28eef44..05736ce 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -713,6 +713,9 @@ func (c *Container) Download(mxcURL string) (data []byte, hs, id string, err err
func (c *Container) GetDownloadURL(hs, id string) string {
dlURL, _ := url.Parse(c.client.HomeserverURL.String())
+ if dlURL.Scheme == "" {
+ dlURL.Scheme = "https"
+ }
dlURL.Path = path.Join(dlURL.Path, "/_matrix/media/v1/download", hs, id)
return dlURL.String()
}