Skip to content

Commit e7f1d45

Browse files
authored
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 <[email protected]>
1 parent 3b804ff commit e7f1d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/webhook/discord.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type (
5555
Wait bool `json:"wait"`
5656
Content string `json:"content"`
5757
Username string `json:"username"`
58-
AvatarURL string `json:"avatar_url"`
58+
AvatarURL string `json:"avatar_url,omitempty"`
5959
TTS bool `json:"tts"`
6060
Embeds []DiscordEmbed `json:"embeds"`
6161
}

0 commit comments

Comments
 (0)