From d0c4fe78eedc883049b684899cee87985ee36680 Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 19 Dec 2017 23:44:13 +0100 Subject: Allow specifying maximum download size of media using MediaDownloadSize (slack,telegram,matrix) --- bridge/matrix/matrix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/matrix') diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index 03e493f7..7e326c22 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -175,7 +175,7 @@ func (b *Bmatrix) handlematrix() error { size := info["size"].(float64) name := ev.Content["body"].(string) flog.Debugf("trying to download %#v with size %#v", name, size) - if size <= 1000000 { + if size <= float64(b.General.MediaDownloadSize) { data, err := helper.DownloadFile(url) if err != nil { flog.Errorf("download %s failed %#v", url, err) -- cgit v1.2.3