4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 21:19:22 +00:00

Add comment to file upload from telegram. Show comments on all bridges. Closes #358

This commit is contained in:
Wim
2018-02-01 00:41:09 +01:00
parent 64a20ee61b
commit 7764493298
6 changed files with 27 additions and 9 deletions

View File

@ -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
}