summaryrefslogtreecommitdiffstats
path: root/bridge/gitter/gitter.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-01 00:41:09 +0100
committerWim <wim@42.be>2018-02-01 00:41:09 +0100
commit7764493298760ec8d33f5387ea2fb6c4705a407e (patch)
treed6ec7e7770780f5ac3f12985b1691dfa792e3646 /bridge/gitter/gitter.go
parent64a20ee61b47e8df982152bfc87a8bb798f009d9 (diff)
downloadmatterbridge-msglm-7764493298760ec8d33f5387ea2fb6c4705a407e.tar.gz
matterbridge-msglm-7764493298760ec8d33f5387ea2fb6c4705a407e.tar.bz2
matterbridge-msglm-7764493298760ec8d33f5387ea2fb6c4705a407e.zip
Add comment to file upload from telegram. Show comments on all bridges. Closes #358
Diffstat (limited to 'bridge/gitter/gitter.go')
-rw-r--r--bridge/gitter/gitter.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go
index fce58c1f..53f1b0d8 100644
--- a/bridge/gitter/gitter.go
+++ b/bridge/gitter/gitter.go
@@ -124,6 +124,9 @@ func (b *Bgitter) Send(msg config.Message) (string, error) {
if len(msg.Extra["file"]) > 0 {
for _, f := range msg.Extra["file"] {
fi := f.(config.FileInfo)
+ if fi.Comment != "" {
+ msg.Text += fi.Comment + ":"
+ }
if fi.URL != "" {
msg.Text = fi.URL
}