mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 02:32:02 -08:00
Since v1.16.0 we now can upload files via webhook. Old way of showing files with webhook only setup can be removed.
This commit is contained in:
parent
727fa9f929
commit
ff0de85817
@ -234,18 +234,6 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.Log.Debugf("Broadcasting using Webhook")
|
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
|
|
||||||
if fi.Comment != "" {
|
|
||||||
msg.Text = fi.Comment + ": " + fi.URL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// skip empty messages
|
// skip empty messages
|
||||||
if msg.Text == "" && (msg.Extra == nil || len(msg.Extra["file"]) == 0) {
|
if msg.Text == "" && (msg.Extra == nil || len(msg.Extra["file"]) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user