feat(api): 👽 Expose emoji limits in /api/v2/instance

This commit is contained in:
Jesse Wierzbinski 2024-12-09 11:02:15 +01:00
parent c8b909db08
commit cfefd56a55
No known key found for this signature in database
2 changed files with 14 additions and 2 deletions

View file

@ -200,6 +200,11 @@ export default apiRoute((app) =>
max_description_characters:
config.validation.max_media_description_size,
},
emojis: {
emoji_size_limit: config.validation.max_emoji_size,
max_emoji_description_characters:
config.validation.max_emoji_description_size,
},
polls: {
max_characters_per_option:
config.validation.max_poll_option_size,

View file

@ -15,7 +15,7 @@ Refetches the user's profile information from remote servers. Does not work for
- **Permissions**: `read:account`
- **Version History**:
- `0.7.0`: Added.
### Request
#### Example
@ -317,6 +317,13 @@ Extra attributes have been added to the `/api/v2/instance` endpoint. These are i
```ts
type ExtendedInstanceV2 = Instance & {
versia_version: string;
configuration: Instance["configuration"] & {
emojis: {
// In bytes
emoji_size_limit: number;
max_emoji_description_characters: number;
};
};
sso: {
forced: boolean;
providers: SSOProvider[];
@ -366,4 +373,4 @@ URI of the account's Versia entity (for federation). Similar to Mastodon's `uri`
The `username` parameter can now (optionally) be set to change the user's handle.
> [!WARNING]
> Clients should indicate to users that changing their handle will break existing links to their profile. This is reversible, but the old handle will be available for anyone to claim.
> Clients should indicate to users that changing their handle will break existing links to their profile. This is reversible, but the old handle will be available for anyone to claim.