Send mediaserver link to Discord in Webhook mode (discord) (#405)

This commit is contained in:
ValdikSS 2018-04-18 00:52:48 +03:00 committed by Wim
parent e57f3a7e6c
commit a12a8d4fe2

View File

@ -130,6 +130,12 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
return "", nil return "", nil
} }
b.Log.Debugf("Broadcasting using Webhook") b.Log.Debugf("Broadcasting using Webhook")
for _, f := range msg.Extra["file"] {
fi := f.(config.FileInfo)
if fi.URL != "" {
msg.Text += fi.URL + " "
}
}
err := b.c.WebhookExecute( err := b.c.WebhookExecute(
wID, wID,
wToken, wToken,