Skip to content

Commit ccf4349

Browse files
matrix: Don't check announced file size, HTTP client will do it
1 parent 0c6c021 commit ccf4349

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

bridge/matrix/matrix.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ func (b *Bmatrix) handleDownloadFile(rmsg *config.Message, content event.Content
757757
ok bool
758758
url, name, msgtype, mtype string
759759
info map[string]interface{}
760-
size float64
761760
)
762761

763762
rmsg.Extra = make(map[string][]interface{})
@@ -774,10 +773,6 @@ func (b *Bmatrix) handleDownloadFile(rmsg *config.Message, content event.Content
774773
return fmt.Errorf("info isn't a %T", info)
775774
}
776775

777-
if size, ok = info["size"].(float64); !ok {
778-
return fmt.Errorf("size isn't a %T", size)
779-
}
780-
781776
if name, ok = content.Raw["body"].(string); !ok {
782777
return fmt.Errorf("name isn't a %T", name)
783778
}

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
the return code is not 200 to avoid saving trash data ([#20](https://github.com/matterbridge-org/matterbridge/pull/20))
5353
- matrix
5454
- attachments received from matrix are working again, with authenticated media (MSC3916) implemented ([#61](https://github.com/matterbridge-org/matterbridge/pull/61))
55-
- image attachments are now send as images with more metadata ([#61](https://github.com/matterbridge-org/matterbridge/pull/61))
55+
- image attachments are now sent as images with more metadata ([#61](https://github.com/matterbridge-org/matterbridge/pull/61))
5656
- xmpp
5757
- various upstream go-xmpp changes fix connection on SASL2 with PLAIN auth
5858
- telegram

0 commit comments

Comments
 (0)