summaryrefslogtreecommitdiffstats
path: root/bridge/matrix
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-12-19 23:44:13 +0100
committerWim <wim@42.be>2017-12-19 23:44:13 +0100
commitd0c4fe78eedc883049b684899cee87985ee36680 (patch)
treeba04699eb3e2557a8a0d6a7806b8e9b8b2a72656 /bridge/matrix
parent265457b45171dcae96a1aac9454e3bda2cd0557a (diff)
downloadmatterbridge-msglm-d0c4fe78eedc883049b684899cee87985ee36680.tar.gz
matterbridge-msglm-d0c4fe78eedc883049b684899cee87985ee36680.tar.bz2
matterbridge-msglm-d0c4fe78eedc883049b684899cee87985ee36680.zip
Allow specifying maximum download size of media using MediaDownloadSize (slack,telegram,matrix)
Diffstat (limited to 'bridge/matrix')
-rw-r--r--bridge/matrix/matrix.go2
1 files changed, 1 insertions, 1 deletions
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)