diff options
author | Wim <wim@42.be> | 2019-01-07 22:16:00 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-01-07 22:16:00 +0100 |
commit | 46e268399557a04f8b7274f30064ad7d8cf29408 (patch) | |
tree | 244c0e15435f1c8037022fae11a01ce1999846fb /bridge | |
parent | 492722af8b1962581802465581e3a041880b8808 (diff) | |
download | matterbridge-msglm-46e268399557a04f8b7274f30064ad7d8cf29408.tar.gz matterbridge-msglm-46e268399557a04f8b7274f30064ad7d8cf29408.tar.bz2 matterbridge-msglm-46e268399557a04f8b7274f30064ad7d8cf29408.zip |
Add file comment to webhook messages (discord). Fixes #358
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/discord/discord.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index f27210b5..b6c2ae11 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -188,8 +188,14 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) { b.Log.Debugf("Broadcasting using Webhook") for _, f := range msg.Extra["file"] { fi := f.(config.FileInfo) + if fi.Comment != "" { + msg.Text += fi.Comment + ": " + } if fi.URL != "" { - msg.Text += " " + fi.URL + msg.Text = fi.URL + if fi.Comment != "" { + msg.Text = fi.Comment + ": " + fi.URL + } } } // skip empty messages |