mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
docs(api): correct the synced preferences size limits (#2740)
This commit is contained in:
@@ -316,7 +316,7 @@ Update semantics belong to the [user settings update object](/http-api/users/set
|
||||
|
||||
<sup>5</sup> Duplicate identifiers are removed and the array is returned in ascending identifier order
|
||||
|
||||
<sup>6</sup> The message is `fluxer.user.preferences.v1.SyncedPreferences`. The empty string means nothing has been synced yet. The decoded message cannot exceed 262144 bytes, the 256 KiB ceiling
|
||||
<sup>6</sup> The message is `fluxer.user.preferences.v1.SyncedPreferences`. The empty string means nothing has been synced yet. The decoded message cannot exceed 524288 bytes, the 512 KiB ceiling
|
||||
|
||||
<sup>7</sup> The field is read-only here and is changed by [Modify voice activity sharing](/http-api/users/settings/#modify-voice-activity-sharing)
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ Fluxer reports every entry in the resulting `errors` array against the path `syn
|
||||
|
||||
| Condition | Status and code | Element codes |
|
||||
| --- | --- | --- |
|
||||
| Encoded string longer than 349528 characters | 400 `INVALID_FORM_BODY` | `CONTENT_EXCEEDS_MAX_LENGTH` and `INVALID_FORMAT` |
|
||||
| Encoded string longer than 699052 characters | 400 `INVALID_FORM_BODY` | `CONTENT_EXCEEDS_MAX_LENGTH` and `INVALID_FORMAT` |
|
||||
| Encoded string outside the base64 alphabet | 400 `INVALID_FORM_BODY` | `INVALID_FORMAT` |
|
||||
| Decoded message above 262144 bytes | 400 `INVALID_FORM_BODY` | `TOO_LARGE` |
|
||||
| Decoded message above 524288 bytes | 400 `INVALID_FORM_BODY` | `TOO_LARGE` |
|
||||
| Bytes that do not decode as `SyncedPreferences` | 400 `INVALID_FORM_BODY` | `INVALID_FORMAT` |
|
||||
|
||||
An over-length string draws two entries for the one path.
|
||||
|
||||
@@ -254,7 +254,7 @@ Further members are accepted and ignored. `guild_positions` is an array of at mo
|
||||
|
||||
<sup>12</sup> The field is staff-only
|
||||
|
||||
<sup>13</sup> The value runs to at most 349528 characters of base64 and decodes to at most 262144 bytes, the 256 KiB ceiling. A longer string fails at the boundary, an oversized decode fails with `TOO_LARGE`, and an undecodable value fails with `INVALID_FORMAT`
|
||||
<sup>13</sup> The value runs to at most 699052 characters of base64 and decodes to at most 524288 bytes, the 512 KiB ceiling. A longer string fails at the boundary, an oversized decode fails with `TOO_LARGE`, and an undecodable value fails with `INVALID_FORMAT`
|
||||
|
||||
Fluxer decodes an accepted `synced_preferences` value, re-encodes it canonically, and stores the result, so a snapshot with only zero values is stored as cleared and read back as the empty string.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user