mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Skip events for webhook
This commit is contained in:
parent
63b88e77f2
commit
d62f49d1fc
@ -128,6 +128,10 @@ func (b *bdiscord) Send(msg config.Message) (string, error) {
|
||||
|
||||
// Use webhook to send the message
|
||||
if wID != "" {
|
||||
// skip events
|
||||
if msg.Event != "" {
|
||||
return "", nil
|
||||
}
|
||||
flog.Debugf("Broadcasting using Webhook")
|
||||
err := b.c.WebhookExecute(
|
||||
wID,
|
||||
|
@ -361,6 +361,11 @@ func (b *Bmattermost) handleUploadFile(msg *config.Message) (string, error) {
|
||||
|
||||
// sendWebhook uses the configured WebhookURL to send the message
|
||||
func (b *Bmattermost) sendWebhook(msg config.Message) (string, error) {
|
||||
// skip events
|
||||
if msg.Event != "" {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
if b.Config.PrefixMessagesWithNick {
|
||||
msg.Text = msg.Username + msg.Text
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user