mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
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 <john.olheiser@gmail.com>
This commit is contained in:
parent
3b804ff76c
commit
e7f1d45eb5
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ type (
|
||||||
Wait bool `json:"wait"`
|
Wait bool `json:"wait"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
AvatarURL string `json:"avatar_url"`
|
AvatarURL string `json:"avatar_url,omitempty"`
|
||||||
TTS bool `json:"tts"`
|
TTS bool `json:"tts"`
|
||||||
Embeds []DiscordEmbed `json:"embeds"`
|
Embeds []DiscordEmbed `json:"embeds"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue