diff --git a/content/docs/build/server-api.mdx b/content/docs/build/server-api.mdx index e367225..c66e63d 100644 --- a/content/docs/build/server-api.mdx +++ b/content/docs/build/server-api.mdx @@ -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 diff --git a/content/docs/build/webhooks.mdx b/content/docs/build/webhooks.mdx index 67ddcdd..04e60e9 100644 --- a/content/docs/build/webhooks.mdx +++ b/content/docs/build/webhooks.mdx @@ -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, diff --git a/src/components/webhooks/openapi.json b/src/components/webhooks/openapi.json index 7b5ffe5..51ac5d2 100644 --- a/src/components/webhooks/openapi.json +++ b/src/components/webhooks/openapi.json @@ -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"