From 27ef58c0127efe61b0b197407fd6f0acf6fd3627 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 10 Jan 2023 13:01:52 -0600 Subject: [PATCH] fix: omit avatar_url in discord payload when empty (#22393) Fixes #22391 This field is optional for Discord, however when it exists in the payload it is now validated. Omitting it entirely just makes Discord use the default for that webhook, which is set on the Discord side. Signed-off-by: jolheiser --- services/webhook/discord.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/webhook/discord.go b/services/webhook/discord.go index f65a8648c435a..82c5ce10545a2 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -54,7 +54,7 @@ type ( Wait bool `json:"wait"` Content string `json:"content"` Username string `json:"username"` - AvatarURL string `json:"avatar_url"` + AvatarURL string `json:"avatar_url,omitempty"` TTS bool `json:"tts"` Embeds []DiscordEmbed `json:"embeds"` }