diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-21 15:57:53 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-21 15:57:53 +0100 |
commit | ddd5936fb1f92432123a9a30d1d3a1fa644a4f8e (patch) | |
tree | 6a06aac9b5e676a2987f4bf612abea5500155ea2 /mxlib/mediaobject.go | |
parent | 92d380aa86dfd3e60f5b8d826ec96c0fbc17614a (diff) | |
download | easybridge-ddd5936fb1f92432123a9a30d1d3a1fa644a4f8e.tar.gz easybridge-ddd5936fb1f92432123a9a30d1d3a1fa644a4f8e.zip |
Files&images Mattermost->Matrix works
Diffstat (limited to 'mxlib/mediaobject.go')
-rw-r--r-- | mxlib/mediaobject.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mxlib/mediaobject.go b/mxlib/mediaobject.go index 8a730d2..1c35187 100644 --- a/mxlib/mediaobject.go +++ b/mxlib/mediaobject.go @@ -5,6 +5,8 @@ import ( "fmt" "net/url" "net/http" + + "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" ) type MediaObject struct { @@ -12,6 +14,7 @@ type MediaObject struct { filename string size int64 mimetype string + imageSize *connector.ImageSize MxcServer string MxcMediaId string } @@ -28,6 +31,10 @@ func (m *MediaObject) Mimetype() string { return m.mimetype } +func (m *MediaObject) ImageSize() *connector.ImageSize { + return m.imageSize +} + func (m *MediaObject) Read() (io.ReadCloser, error) { req, err := http.NewRequest("GET", m.URL(), nil) if err != nil { |