]> source.dussan.org Git - gitea.git/commitdiff
fix: omit avatar_url in discord payload when empty (#22393) (#22395) release/v1.17
authorJohn Olheiser <john.olheiser@gmail.com>
Tue, 10 Jan 2023 19:37:15 +0000 (13:37 -0600)
committerGitHub <noreply@github.com>
Tue, 10 Jan 2023 19:37:15 +0000 (13:37 -0600)
Backport #22393

Signed-off-by: jolheiser <john.olheiser@gmail.com>
services/webhook/discord.go

index f65a8648c435ac0ef956aa950b7aec9c03fd1bf6..82c5ce10545a28a5b2728c40f2d8d1cdd8409f43 100644 (file)
@@ -54,7 +54,7 @@ type (
                Wait      bool           `json:"wait"`
                Content   string         `json:"content"`
                Username  string         `json:"username"`
-               AvatarURL string         `json:"avatar_url"`
+               AvatarURL string         `json:"avatar_url,omitempty"`
                TTS       bool           `json:"tts"`
                Embeds    []DiscordEmbed `json:"embeds"`
        }