From be66c53c2b3401fabb630f1d59deb78265894fb9 Mon Sep 17 00:00:00 2001 From: ulna <220980518+ulnanlu@users.noreply.github.com> Date: Fri, 5 Sep 2025 11:25:56 +0200 Subject: [PATCH] fix(webhook/discord): fixed username cannot be empty error on discord webhook username field is not required by discord so sending it as blank causes a 400 error. it should be omitted instead when it's not set. Closes #35411 --- 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 04269641811df..6f045bd112590 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -57,7 +57,7 @@ type ( DiscordPayload struct { Wait bool `json:"wait"` Content string `json:"content"` - Username string `json:"username"` + Username string `json:"username,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` TTS bool `json:"tts"` Embeds []DiscordEmbed `json:"embeds"`