Commit f69d71e
Fix discord webhook 400 status code when description limit is exceeded (go-gitea#34084)
Fixes [go-gitea#34027](go-gitea#34027)
Discord does not allow for description bigger than 2048 bytes. If the
description is bigger than that it will throw 400 and the event won't
appear in discord. To fix that, in the createPayload method we now slice
the description to ensure it doesn’t exceed the limit.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>1 parent 0e64893 commit f69d71e
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
310 | | - | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| |||
0 commit comments