Send mediaserver link to Discord in Webhook mode

This commit is contained in:
ValdikSS
2018-04-13 01:28:50 +03:00
parent 8bfaa007d5
commit c38abea077

View File

@@ -130,6 +130,12 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
return "", nil
}
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(
wID,
wToken,