mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-06 18:24:12 +02:00
fix(webhook/discord): fixed username cannot be empty error (#35412)
username field is not required by discord and used to override the default username. sending it as blank causes a 400 error. it should be omitted instead when it's not set. Ref: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params Closes #35411
This commit is contained in:
parent
998b6b8889
commit
09d1f359d5
@ -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"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user