diff options
author | Wim <wim@42.be> | 2019-02-16 18:35:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 18:35:36 +0100 |
commit | 3e60cfafd342b0a6d27947d27cc125421b8f028a (patch) | |
tree | 90cc912ef17ca9181e6169d38f0de07e4d129671 /bridge | |
parent | 312369586925e0419271df7466e9b40756738f89 (diff) | |
download | matterbridge-msglm-3e60cfafd342b0a6d27947d27cc125421b8f028a.tar.gz matterbridge-msglm-3e60cfafd342b0a6d27947d27cc125421b8f028a.tar.bz2 matterbridge-msglm-3e60cfafd342b0a6d27947d27cc125421b8f028a.zip |
Send username when uploading video/images (matrix). Fixes #715 (#717)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/matrix/matrix.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index 45f26c71..708788a9 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -283,6 +283,12 @@ func (b *Bmatrix) handleUploadFile(msg *config.Message, channel string, fi *conf if err != nil { b.Log.Errorf("file comment failed: %#v", err) } + } else { + // image and video uploads send no username, we have to do this ourself here #715 + _, err := b.mc.SendText(channel, msg.Username) + if err != nil { + b.Log.Errorf("file comment failed: %#v", err) + } } b.Log.Debugf("uploading file: %s %s", fi.Name, mtype) res, err := b.mc.UploadToContentRepo(content, mtype, int64(len(*fi.Data))) |