mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 16:39:24 +00:00
Allow specifying maximum download size of media using MediaDownloadSize (slack,telegram,matrix)
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user