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

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

index 22d75db89305d7cbadf3e0f204fe41459da0f545..9511258eeab49cf72789603cc92c1ec477e61653 100644 (file)
@@ -55,7 +55,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"`
        }