summaryrefslogtreecommitdiffstats
path: root/bridge/discord/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/discord/webhook.go')
-rw-r--r--bridge/discord/webhook.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/bridge/discord/webhook.go b/bridge/discord/webhook.go
index 7dacc7cd..9177db07 100644
--- a/bridge/discord/webhook.go
+++ b/bridge/discord/webhook.go
@@ -63,9 +63,10 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
res, err = b.transmitter.Send(
channelID,
&discordgo.WebhookParams{
- Content: msg.Text,
- Username: msg.Username,
- AvatarURL: msg.Avatar,
+ Content: msg.Text,
+ Username: msg.Username,
+ AvatarURL: msg.Avatar,
+ AllowedMentions: b.getAllowedMentions(),
},
)
if err != nil {
@@ -88,10 +89,11 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
_, e2 := b.transmitter.Send(
channelID,
&discordgo.WebhookParams{
- Username: msg.Username,
- AvatarURL: msg.Avatar,
- File: &file,
- Content: content,
+ Username: msg.Username,
+ AvatarURL: msg.Avatar,
+ File: &file,
+ Content: content,
+ AllowedMentions: b.getAllowedMentions(),
},
)
if e2 != nil {
@@ -124,8 +126,9 @@ func (b *Bdiscord) handleEventWebhook(msg *config.Message, channelID string) (st
if msg.ID != "" {
b.Log.Debugf("Editing webhook message")
err := b.transmitter.Edit(channelID, msg.ID, &discordgo.WebhookParams{
- Content: msg.Text,
- Username: msg.Username,
+ Content: msg.Text,
+ Username: msg.Username,
+ AllowedMentions: b.getAllowedMentions(),
})
if err == nil {
return msg.ID, nil