-
-
Couldn't load subscription status.
- Fork 6.2k
Closed
Description
Description
I believe the Username here should be set to omitempty like AvatarURL since username is not a required field for webhook requests. Sending it blank causes a 400 error.
Reference: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
gitea/services/webhook/discord.go
Lines 60 to 61 in 0734763
| Username string `json:"username"` | |
| AvatarURL string `json:"avatar_url,omitempty"` |
Payload sent:
{
"wait": false,
"content": "",
"username": "",
"tts": false,
"embeds": [
...
]
}Error response from discord:
{"username": ["Must be between 1 and 80 in length.", "Username cannot be \"\""]}Gitea Version
1.24.3
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
binaries provided by gitea
Database
None