Parcourir la source

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>
tags/v1.19.0-rc0
John Olheiser il y a 1 an
Parent
révision
e7f1d45eb5
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      services/webhook/discord.go

+ 1
- 1
services/webhook/discord.go Voir le fichier

@@ -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"`
}

Chargement…
Annuler
Enregistrer