Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/docs/build/server-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Sending is `chat:send` over the socket. There's no POST here.
| POST | `/api/uploads/avatar` | Bearer | multipart |
| DELETE | `/api/uploads/avatar` | Bearer | |
| POST | `/api/uploads/group-icon` | Bearer | multipart `file`, a group's picture. Returns `fileId` for `dm:group:update` and doesn't change your avatar |
| POST | `/api/uploads/webhook-avatar` | Bearer | multipart `file`, a webhook's avatar. Needs Manage webhooks. Returns `fileId` for the webhook's `avatar_file_id` and doesn't change your avatar |
| GET | `/api/uploads/files/:fileId` | — | `?thumb=1` for the thumbnail, `?download=1` for an attachment header |

### Server
Expand Down
2 changes: 2 additions & 0 deletions content/docs/build/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ original URL afterwards changes nothing in Gryt.
- Private and local addresses are refused, and so is a chain of more than 5
redirects
- The same URL used twice in a message is downloaded once
- `avatar_url` is resized to 256 px, the same as any other avatar. Card pictures
keep their size

A picture that fails doesn't stop the message. It posts without that picture,
and the reply lists what went wrong under `warnings`. Because of the downloads,
Expand Down
2 changes: 1 addition & 1 deletion src/components/webhooks/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"type": "string"
},
"avatar_url": {
"description": "Posts with this picture instead of the webhook's. Fetched once and stored, same as card images.",
"description": "Posts with this picture instead of the webhook's. Downloaded once and resized to 256 px, like any other avatar.",
"type": "string",
"maxLength": 2048,
"format": "uri"
Expand Down
Loading