A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
docs(api): correct the synced preferences size limits (#2740)
Hampusa59b80ce111b
diff --git a/fluxer_docs/src/content/docs/http-api/users.mdx b/fluxer_docs/src/content/docs/http-api/users.mdxindex 607db18a3..bc83f31c2 100644--- a/fluxer_docs/src/content/docs/http-api/users.mdx+++ b/fluxer_docs/src/content/docs/http-api/users.mdx@@ -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)diff --git a/fluxer_docs/src/content/docs/http-api/users/settings-protobuf.md b/fluxer_docs/src/content/docs/http-api/users/settings-protobuf.mdindex 00e8228ca..7cdf071fe 100644--- a/fluxer_docs/src/content/docs/http-api/users/settings-protobuf.md+++ b/fluxer_docs/src/content/docs/http-api/users/settings-protobuf.md@@ -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.diff --git a/fluxer_docs/src/content/docs/http-api/users/settings.mdx b/fluxer_docs/src/content/docs/http-api/users/settings.mdxindex c7740f8dd..103a7edef 100644--- a/fluxer_docs/src/content/docs/http-api/users/settings.mdx+++ b/fluxer_docs/src/content/docs/http-api/users/settings.mdx@@ -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.