mirror of
https://github.com/go-gitea/gitea
synced 2025-09-21 08:08:14 +00:00
Backport #35412 by @ulnanlu 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 Co-authored-by: ulnanlu <220980518+ulnanlu@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,7 @@ type (
|
|||||||
DiscordPayload struct {
|
DiscordPayload struct {
|
||||||
Wait bool `json:"wait"`
|
Wait bool `json:"wait"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username,omitempty"`
|
||||||
AvatarURL string `json:"avatar_url,omitempty"`
|
AvatarURL string `json:"avatar_url,omitempty"`
|
||||||
TTS bool `json:"tts"`
|
TTS bool `json:"tts"`
|
||||||
Embeds []DiscordEmbed `json:"embeds"`
|
Embeds []DiscordEmbed `json:"embeds"`
|
||||||
|
Reference in New Issue
Block a user