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/telegram/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/telegram/telegram.go') diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 95492a88..2aabf3a8 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -299,7 +299,7 @@ func (b *Btelegram) handleDownload(file interface{}, msg *config.Message) { // if we have a file attached, download it (in memory) and put a pointer to it in msg.Extra // limit to 1MB for now flog.Debugf("trying to download %#v fileid %#v with size %#v", name, fileid, size) - if size <= 1000000 { + if size <= b.General.MediaDownloadSize { data, err := helper.DownloadFile(url) if err != nil { flog.Errorf("download %s failed %#v", url, err) -- cgit v1.2.3