Merge PR #11: myTeamSpeak avatar, badges and User Tag; banners; gateway speed and logs

Conflicts and how they were resolved:
- CHANGELOG.md: both sides' lines kept under [Unreleased], each in its
  section; the badges line says TeamSpeak 6's verified badges come first.
- crates/proto/UPSTREAM.md: #11's myTeamSpeak presentation stays patch 15;
  this branch's privilege key (default_token) patch becomes 16.
- voelin-core web.rs: #11's downloader (retry hints, revalidation, proxies,
  per-host limits) as it is. The chat pictures' size limit sits on top as
  web::fetch_chat_picture, which narrows #11's Limits; fetch_within takes
  them by value. The badge pictures go through #11's fetch like banners.
- voelin-core session.rs: both sides' fields kept (chat_pictures and
  unfetchable). Chat pictures ([img]) are an ImageRequest of their own
  (ChatPicture) instead of sharing Picture with banners, so #11's banner
  policy (retried every 15 minutes while shown, logged by address) does
  not apply to them: they keep the 1, 4, 16 s retries and are checked
  against the size they were asked for; their failures are logged by host
  at debug level. Badge pictures stay Pictures next to #11's banner loop
  (with its unfetchable-scheme log).
- voelin-ui servers.rs: #11's imports (Instant, debug) with this branch's
  (no SharedString).

Where the two badge features meet: the presence's badges are now
voelin_model::shown_badges, TeamSpeak 6's client_signed_badges (what #11
sends for our account, and other TS6 users' verified badges) first, then
client_badges, each once; so the badges chosen in Settings → My Account
show in the tree and on the member card like other people's.

Also: docs/ui.md describes My Account's badge choice and User Tag, the
new ui.image_cache_mb default (256), and the picture downloads as #11 left
them (16 at once, 6 per host, 128 MiB, the new timeouts, banner and badge
retries, proxies, BMP and ICO, scaling down past 4096 pixels) with the
chat pictures' own retries; the demo's login:account switch fills in a
badge choice and a User Tag for screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
Claude committed 2026-10-08 02:14:08 +00:00
commit 507dff58b2
78 files changed
+10311 -765

No files matched your search

+123 -11
View File
@@ -76,9 +76,30 @@ Every login, post and settings change is written to the audit table.
`permoverview`, `banlist`, `clientmove`, `sendtextmessage`,
`servergroupsbyclientid` and `channelgroupclientlist`, e.g. a dedicated
login in the Server Admin group.
3. Put the gateway's IP into `query_ip_allowlist.txt` and set
`query.allowlisted = true`. Otherwise the server's flood protection
(10 commands / 3 s) applies and bans the gateway under load.
3. Put the address the server sees for the gateway into the server's
`query_ip_allowlist.txt` and set `query.allowlisted = true`. The server's
flood protection counts the query commands of each address, all of
tsgw's connections together and the SSH login included: it refuses the
10th command within 3 seconds and asks to wait, and two more commands
during the wait get the address banned for 600 seconds. tsgw logs the
address when it starts ("the TeamSpeak server sees the gateway's queries
coming from this address"):
- tsgw on the server's machine: `127.0.0.1`, which the file lists by
default.
- tsgw in a Docker container with bridge networking: the container's
or the bridge's address (e.g. `172.17.0.2`), not `127.0.0.1`. Add
that address, or run the container with `--network host`.
The server reads the file again within seconds, without a restart; that
also lifts a 600 s ban. Do not set `allowlisted = true` without the
entry in the file: tsgw then sends at full speed until the server
refuses a command, and an older tsgw got the address banned that way.
Now it stops at the first refusal and logs "the server limits this
address although it was taken to be on its query allowlist". Without
the allowlist tsgw stays under the limit itself (9 commands per 3 s
over all its connections) and, after a refusal (other query tools on
the same address count too), sends nothing on any connection for at
least 3 s, so logins are slower when many happen at once.
4. Each relayed channel is one more query connection. Keep
`relay.max_channel_relays` below the server's per-IP connection limit.
Relays count toward a channel's max clients unless their group has
@@ -102,9 +123,16 @@ registered domain, the most specific name first; for `ts.example.org` that
is `ts.example.org`, then `example.org`. It looks once per run when the
server is selected or connects with voice, and again when its address
changes: what is published takes the place of what was found before (a
lookup that finds nothing keeps it). A gateway that cannot be reached is
tried again by itself (after 2, 5, 15, 30, then every 60 seconds); users
see nothing of it, the log file has the URL and the error.
lookup that finds nothing keeps it). Every gateway found is kept and
tried in turn, best first, each for up to 20 seconds; the first that logs
in is used, and the log file names those it passed over (URL and error).
Only when all of them fail does it wait (1, 2, 5, 10, 20, then every 30
seconds, give or take 30 %; at once when voice connects) and start over;
users see nothing of it. Only a refused login ends it (bad signature,
security level too low, banned, not allowed); a gateway that cannot do the
login yet (for example an identity the server has not seen) is tried again.
Once connected, the client pings the gateway every 30 seconds and connects
again after 60 seconds without an answer.
**DNS records** (preferred). An SRV record names the gateway's host and
port, the service name says whether it speaks TLS:
@@ -115,9 +143,17 @@ port, the service name says whether it speaks TLS:
| `_tsgw._tcp.<name> SRV <prio> <weight> <port> <host>` | `ws://<host>:<port>/v1` (plain, e.g. tsgw itself on 7788) |
| `_tsgws._tcp.<name> TXT "path=/<path>"` (optional, same for `_tsgw`) | another path than `/v1`, e.g. behind a reverse proxy |
At the same name TLS wins; among several records of one name the lowest
priority. A target of `.` means "no gateway here" and the search goes on at
the parent domain. Examples (zone of `example.org`):
Which gateways: those of the most specific name that publishes a record,
and only those (a parent domain's records are another server's gateway
when the host publishes its own). At that name `_tsgws` before `_tsgw`,
among several records of one kind the lowest priority first, then tsgw's
own answer at that name (below), but only when a plain record is published
there, so a server that publishes only TLS is never reached without it. A
TLS proxy that fails (no rule for the host, no certificate) thus falls
back to the plain gateway published next to it. With no record at any
name, tsgw's own answer at the most specific name that gives one. A target
of `.` means "no gateway here" and the search goes on at the parent
domain. Examples (zone of `example.org`):
```dns
; Behind a TLS proxy at gw.example.org that forwards /tsgw/v1 to tsgw:
@@ -135,6 +171,18 @@ itself speaks plain WebSocket, so its own port (7788) is published as
`_tsgw`; a `_tsgws` record there makes Voelin start TLS with it, which
fails. Publish `_tsgws` only for a port with TLS in front.
Behind [Zoraxy](https://zoraxy.aroz.org/): add an HTTP proxy rule for the
gateway's host (`gw.example.org`) with one upstream, tsgw's plain address
(`<tsgw host>:7788`), "Proxy Target require TLS Connection" off,
WebSockets on, and a certificate for the host (ACME). If the rule also
has an uptime monitor, point it at `/health` (tsgw's `/` answers 404).
Check from outside: `curl https://gw.example.org/health` prints `ok` (or
what is missing while tsgw is not logged in to the TeamSpeak server, see
[Logs](#logs)); Zoraxy's own `404 page not found` there means no rule
matched the host or the request went to another upstream. Then set `listen.public_url =
"wss://gw.example.org/v1"` in tsgw.toml, so its own answer points at the
proxy.
One domain with several servers and several gateways: publish one record
per server host (`_tsgws._tcp.ts1.example.org`, `_tsgws._tcp.ts2.example.org`);
a record at the domain itself applies to every host below it that has none
@@ -193,11 +241,74 @@ the unit to `/etc/systemd/system/`.
```sh
docker load -i tsgw-image.tar.gz # or: docker build -f crates/voelin-gateway/Dockerfile -t tsgw .
docker run -v $PWD/tsgw.toml:/etc/tsgw/tsgw.toml -e TSGW_QUERY_PASSWORD=… -p 7788:7788 tsgw
docker run -d --name tsgw --init --restart unless-stopped \
-v $PWD/tsgw.toml:/etc/tsgw/tsgw.toml:ro -v tsgw-data:/var/lib/tsgw \
-e TSGW_QUERY_PASSWORD=… -p 7788:7788 tsgw
docker logs -f tsgw
```
The volume keeps the database (`/var/lib/tsgw/tsgw.db`: login tokens,
history, settings changed at runtime) when the container is replaced.
`--init` passes `docker stop` on to tsgw and cleans up after it;
`--restart unless-stopped` brings it back after a crash or a reboot. With
bridge networking (the default) see step 3 of [Setup](#setup) about the
address the TeamSpeak server sees.
**From source:** `cargo run --release -p voelin-gateway -- --config tsgw.toml`.
## Logs
tsgw logs to standard output: `journalctl -u tsgw -f` under systemd,
`docker logs -f tsgw` in a container (colours only on a terminal; `NO_COLOR`
turns them off there too). At the default level it logs:
- at start: the version and settings in use (whether a query password is
set, never the password itself), the query login and how long it took,
the address the TeamSpeak server sees for the gateway (with a hint when
`query.allowlisted` is off), "listening" with the URL apps are given;
- each app connection: its address, `X-Forwarded-For` and `User-Agent`,
then logins (unique id, nickname, signature or token, how long it took),
refused logins with the reason, requests slower than 1 s and the close
(reason, how long it was open). Every line of a connection carries its
number and address (`ws{id=12 peer=…}`);
- ServerQuery: failed commands (by name), each wait the server's flood
protection asks for, relays opened and closed, the watcher connecting
and losing its connection (with the attempt and the next wait), the
lookup connection lost and restored.
More detail with `log.level` (`TSGW_LOG_LEVEL`; without it `RUST_LOG`):
| Setting | Shows |
|---|---|
| `TSGW_LOG_LEVEL=debug` | also every request and its time, ServerQuery connections opening and closing |
| `TSGW_LOG_LEVEL=info,voelin_query=trace` | every query command sent and answered, with its time and the connection it went over (`lookup`, `observer`, `relay <channel>`) |
| `TSGW_LOG_LEVEL=warn` | only problems |
Libraries that log every packet (`russh`, `hyper`, `h2`, `tower`,
`tungstenite`) stay at warnings unless the setting names them
(`debug,russh=debug`). Under systemd put the variable into
`/etc/tsgw/tsgw.env`, in a container pass `-e TSGW_LOG_LEVEL=…`.
`log.file` (`TSGW_LOG_FILE`) writes the log to a file as well. tsgw appends
to it, also across restarts; at 20 MB it moves to `tsgw.1.log` (older ones
one further along, 5 files in all) and a new one starts. A relative path is
relative to the working directory, `/var/lib/tsgw` under systemd and in the
container (`TSGW_LOG_FILE=logs/tsgw.log` with the volume above). The systemd
unit can also write `/var/log/tsgw`. If the file cannot be opened, tsgw
says so and logs to standard output only.
While the TeamSpeak server cannot be reached (not started yet, restarting),
tsgw listens anyway and logs in as soon as it can, waiting 1, 2, 3, 5, 10,
then 30 seconds between attempts (longer if the server's flood protection
asks for it). Apps that connect meanwhile wait up to 10 seconds, then are
told to try again. A query connection the server drops is opened again the
same way, and relays that someone still reads or that are pinned come back.
Opening a query connection (connecting, logging in, selecting the server)
gives up after 10 seconds, so a server that does not answer holds up
nothing for long. `/health` answers
`ok` while the gateway is logged in and watching the server, otherwise 503
and what is missing (`starting: …`, `query: down, observer: up`).
## Visibility
Query clients are not hidden by the server; official clients hide them from
@@ -213,7 +324,8 @@ query clients sees that it came from a query session.
- **Bootstrap** keys are needed before the database opens: `gateway_id`,
`server.voice_port`, `query.*` (transport, address, login, password,
`allowlisted`), `listen.bind`, `listen.public_url` and `history.path`.
`allowlisted`), `listen.bind`, `listen.public_url`, `history.path` and
`log.level`, `log.file` ([Logs](#logs)).
They come from the file, the environment or the command line and apply
at start; changing them needs a restart.
- Everything else (history, relays, features, permission rules, quotas,
+111
View File
@@ -108,6 +108,86 @@ file names and description are used until then. What is kept goes into the
same secret-store bundle as the session (`profile`), never the token into a
URL.
### Presenting the account's avatar, and other clients' avatars (TeamSpeak 6)
Voice servers show the account's avatar (and the blurred banner behind it
in the client-info view) and badges from what the client sends once
connected, not from `clientinit` (the official 6.0.0-beta4.1 client never
sets `client_myteamspeak_avatar` or `client_signed_badges` itself):
updatemytsdata myts_certificate=<cert> [myts_signed_badge=<list>] [myts_avatar=<AvatarData>]
built at 0x1f38520: `myts_certificate` is the inner `MyTSUserCertificate.cert`
bytes, `myts_avatar` a serialized `AvatarData` (its `AvatarInfo`, a timestamp
and myTeamSpeak's signature), `myts_signed_badge` a `UserBadgesSignedList`
of the badges the user chose (at most three, in the chosen order; none
until chosen). The values are the raw bytes with TeamSpeak's escaping only
(`\a` and `\b` included), no base64. The official client sends it once
connected, after a sign-in (after `updatemytsid`), after an avatar upload
and after a badge change.
What the TeamSpeak 6 server (6.0.0-beta13.1) does with it: it parses the
certificate as a TeamSpeak license chain, requires the leaf to be valid now,
of block type 6 (`MYTSID_SIGN`; types 4 to 7 carry nothing after the 42-byte
header), the chain to lead to TeamSpeak's root and the key not to be on
myTeamSpeak's revocation list, and takes the leaf's derived Ed25519 key. It
verifies the avatar's signature over `SerializeAsString(AvatarInfo) ||
myTS ID (33 bytes) || timestamp (u64, big-endian)` and each badge's over
`uuid (16 bytes) || sign_timestamp (u64, big-endian) || myTS ID`, the myTS
ID being the one it holds for the client at that moment. What does not
verify is silently emptied (`client_myteamspeak_avatar` /
`client_signed_badges` become empty, answer `error id=0`); only an unusable
certificate with a non-empty value is refused, with 1538 (also when the
server could not load the revocation list). The server echoes both
properties for the client before its answer. A bare parameter clears it
without a certificate; an absent one is left alone. `updatemytsid` does
not check them again, so they are sent again after it.
Voelin does the same checks locally (`tsproto::myts::Certificate`,
`voelin_myts::choose_avatar`, `choose_badges_certificate`) to choose, for
the avatar and for the chosen badges, a certificate that verifies them,
from those at hand: the last password sign-in's (`LoginSession` fields 10
and 11, the avatar as it came), the one myTeamSpeak's avatar service hands
out with the avatar, and the myTS ID's `pubSignCert` when its leaf is of
type 6. Since a server verifies with the one certificate of each command,
the avatar and the badges go in separate commands when they need different
certificates (one command, certificate, badges, avatar, when one verifies
both). A badge id must be in the 36-character form with hyphens: the server
reads it with Boost's `uuid` parser, which throws on anything else, so such
a badge is never sent. After sending, Voelin logs whether the server shows
them, or why not, and names the badges it dropped (`client_signed_badges`
lists the ids that verified). Each connection sends only what changed, all
of it again after `updatemytsid` or a reconnect, and clears with bare
parameters what it showed and should no longer show: on a sign-out or an
account change, `updatemytsdata myts_certificate myts_signed_badge
myts_avatar` (or only the parts it showed; both answer 0).
Without a password: `requestContactsAvatar` at `/user` with the account's own
raw myTS ID (`RequestContactsAvatarInfoRequest{session, id:
[AvatarRequestID{key: Any(…AvatarRequestID.MYTSKey{id})}]}`) answers the
account's `AvatarData` as it came, whose `optional` field holds
`OptionalAvatarDataContactInfo{mytsid, user_cert}`; `user_cert` is checked
by the official client with the same function as the login certificate. An
unknown session gets an empty answer, like an account without an avatar, so
an empty answer means "nothing learned" and never clears what is kept.
`getSignedBadges(Session)` at `/user` answers `UserBadgesSignedResponse{list,
error_code}` (109 for an unknown session); each `SignedUserBadge` is kept as
it came. Voelin asks both after a password sign-in, after a checked saved
session and then daily, and keeps the answers in
`<data>/account/presentation.json` (public data); the chosen badges are kept
per account in `<data>/account/badges.json`, across sign-outs. A chosen
badge myTeamSpeak no longer lists takes none of the three places, and is
dropped from the choice the next time the user changes it.
Other clients' avatars arrive as `client_myteamspeak_avatar`, plain text
`<state>,<url>;<state>,<url>…` with myTeamSpeak's `AvatarState` numbers
(`request_avatar_with_ts_server_client_property`, 0x1ae2840): an entry
that is not `<number>,<url>` (an empty one from a trailing `;` too) spoils
the whole value; the online picture is shown, else away, do not disturb,
offline; the server's own avatar (`client_flag_avatar`) wins when it loads.
Voelin downloads it (HTTPS, 4 MiB) where the server's is not shown: none
set, no voice connection (observing), or its download gave up.
`requestAvatarSignedUrl` is not a download call: it signs *upload* links.
In the TS6 6.0.0-beta4.1 Linux client, `Account_Manager_Impl::
request_avatar_signed_urls`'s reply goes only to `upload_avatar`, whose
@@ -127,6 +207,37 @@ session deletion; storage or remote errors are reported. A late completion
cannot sign a canceled operation back in. Server identities and bookmark
nicknames remain independent of the primary app profile.
### The User Tag (TeamSpeak 6)
`client_user_tag` is the account's primary TeamSpeak chat identifier
(`name@myteamspeak.com`): the entry with `primary` set in
`getActiveIdentifierList` at `/tschat` (Voelin falls back to
`getAccountData`'s active identifiers). The token that proves it comes from
`requestSignedAllowedIdentifierList` at `/tschat`; both take
`AuthenticatedUser{session}` only (no chat account, `matrix_id` never set)
and answer an `ErrorHandling` whose `return_code` must be 1 (5: the session
expired). The token is a `MatrixIdentifierToken{signature, sign_certificate,
timestamp, tags}`, kept as it came. Viewers (the official client's
`verifyIdentifierToken`) parse `sign_certificate` as a license chain from
TeamSpeak's root, require its leaf to be valid now (any block type), verify
the Ed25519 signature over `SerializeAsString(tags) || timestamp (u64,
big-endian) || myTS ID` with the myTS ID the client shows the server
(`client_myteamspeak_id`), and require the tag to be one of the tags. They
verify once per change of the property, and only if they have a TeamSpeak
chat connection themselves. The value is compact JSON in this key order:
{"myts_token":"<standard padded base64 of the token>","tag":"<tag>","updated":<ms since 1970>}
sent as `clientupdate client_user_tag=<value>` (TeamSpeak escaping, so `/`
goes as `\/`), once connected and after every `updatemytsid`, on servers
that know the property (protocol 8, TeamSpeak 6; on protocol 7 the official
client mirrors the JSON into `client_meta_data`, which Voelin leaves to its
own identification). A bare `clientupdate client_user_tag` clears it, on
sign-out or account change. The server stores and relays the value without
checks (about 8 KB at most). Voelin checks the token itself before using it,
asks for a new one when it would not hold three days later, and shows the
tag in Settings → My Account.
### Authenticated account identity on voice servers
The account UUID is a profile identifier, not the authenticated `myTS ID`.
+39 -25
View File
@@ -223,8 +223,10 @@ back. The signed-in username/email and the account's avatar become the
primary app profile in the desktop user card and mobile You page; they do
not replace server identities or bookmark nicknames. Settings → My Account
shows the profile from the account service (avatar, name, email,
description, member since, previous sign-in, badges, signed-in devices, the
account and myTS ids) or the sign-in form, supports retry/OTP/sign-out, and
description, member since, previous sign-in, badges with a toggle each to
show up to three of them on servers, in the order picked, signed-in
devices, the User Tag, the account and myTS ids) or the sign-in form,
supports retry/OTP/sign-out, and
opens official browser flows for registration, activation, recovery and
account management. Account and renewal material live only in the keyring;
passwords and one-time codes are cleared after submission. Expired sessions
@@ -404,7 +406,7 @@ live when they change (settings page, `--set`, another window):
| `ui.theme` | dark / light / system | dark | colours |
| `ui.font_scale` | number above 0 | 1.0 | every type size |
| `ui.narrow_breakpoint` | pixels | 800 | below this width the phone layout |
| `ui.image_cache_mb` | megabytes | 64 | decoded images kept in memory (0: none) |
| `ui.image_cache_mb` | megabytes | 256 | decoded images kept in memory (0: none) |
| `ui.members_width` | pixels | 280 | width of the members panel (dragging its edge sets it) |
| `ui.image_preview_kb` | kilobytes | 8192 | pictures linked in chat (files and `[img]`) up to this size show as pictures (0: never) |
| `notify.mentions`, `notify.private_messages`, `notify.pokes`, `notify.event_reminders`, `notify.friends_online` | off / app / desktop | desktop (friends: app) | what the bell and the desktop say about each kind |
@@ -606,7 +608,9 @@ profile requires account setup before the server list, so no fresh-profile
network capture was obtained. These observations do not establish that every
server or client version lacks a pre-login mechanism.
Badges arrive as GUIDs (`client_badges`). Their names and descriptions come
Badges arrive as GUIDs (`client_badges`; on TeamSpeak 6 also
`client_signed_badges`, the myTeamSpeak badges the server verified, which
come first: `voelin_model::shown_badges`). Their names and descriptions come
from a table in `voelin-model` (`badges::info`, tsclientlib's list and the
newer entries of TeamSpeak's own, `https://badges-content.teamspeak.com/list`,
as of October 2026); newer badges show as "Badge". Their pictures are SVGs
@@ -627,28 +631,38 @@ server's own files, linked as `ts3image://` (TeamSpeak 5 and 6:
`ts3image://<name>?channel=…&path=…`), come through the voice connection's
file transfer, so they need voice and the server's file permissions. Their
cache entry is named by the server too, as the same address names another
file elsewhere. Up to eight distinct web banners download concurrently;
duplicate URLs share a request. A picture may be up to 64 MiB, avatars and
icons too, and goes to disk as it arrives. Web downloads have a 10-second
connection timeout and fail after 20 seconds without data or when, after
their first 30 seconds, they average less than 32 KiB/s; there is no
fixed overall deadline, so large banners on slow hosts still arrive. Failed
avatars, icons and banners receive up to three automatic retries after
1, 4 and 16 seconds,
without waiting for a presence update. Avatar/icon/banner file-transfer
negotiation expires after 15 seconds, and the download after 30 seconds
plus its size at 32 KiB/s. User file transfers retain their existing
timing. Replaced images and closed sessions discard
obsolete results. A host banner's reload interval is at least 60 seconds;
failed refreshes preserve the previous cached picture. Closing the session
stops its reload timer. `PictureReady` invalidates the decoded image before
refreshing the visible models, including when the URL and cache path stay
the same.
file elsewhere. Up to 16 web downloads run at once, at most 6 per host (a
redirect's target counts); duplicate URLs share a request. Pictures on the
web go through the desktop's proxy (the portal's, on Linux) or the
system's, SOCKS too. A picture may be up to 128 MiB (avatars and icons
too; myTeamSpeak avatars 4 MiB, a chat's `[img]` up to
`ui.image_preview_kb`), and goes to disk as it arrives. Web downloads
connect within 20 seconds, and fail after 60 seconds without data or when,
after their first 120 seconds, they average less than 8 KiB/s; there is
no fixed overall deadline, so large banners on slow hosts still arrive.
Failed banners and badges are tried again after 1, 4, 16, 60, 300 and 900
seconds, then every 15 minutes while they are shown; one whose address is
wrong or gone (HTTP 400, 404, 410) after 15 minutes, then hourly; one whose
host asks to wait (429, 503) when it says (1 minute to 1 hour). Asked for
again, a cached picture is downloaded only if its host says it changed
(ETag, Last-Modified). Avatars, icons and chat pictures receive up to three
automatic retries after 1, 4 and 16 seconds. Retries do not wait for a
presence update. Avatar/icon/banner file-transfer negotiation expires
after 30 seconds, and the download after 60 seconds plus its size at
8 KiB/s. User file transfers retain their existing timing. Replaced images
and closed sessions discard obsolete results. A host banner's reload
interval is at least 60 seconds; failed refreshes preserve the previous
cached picture. Closing the session stops its reload timer.
`PictureReady` (and `AvatarReady`, `IconReady`) has a file that changed
decoded again before the visible models refresh, also when the URL and
cache path stay the same.
PNG, JPEG, GIF, WebP and SVG are decoded by content, since cached files have
no extension. Raster pictures larger than 16,384 pixels on either axis or
64 MiB of decoded RGBA are refused before pixel allocation on the UI
thread. SVG uses Slint's vector loader and the existing vector-cache cost.
PNG, JPEG, GIF, WebP, BMP, ICO and SVG (also after a comment or DOCTYPE)
are decoded by content, since cached files have no extension. Raster
pictures whose decoded RGBA would exceed 128 MiB are refused before pixel
allocation on the UI thread; those larger than 4096 pixels on a side are
scaled down (an animation to its first frame). SVG uses Slint's vector
loader and the existing vector-cache cost.
Avatars and server, channel, client and group icons use the same image cache.
The focused checks are the `voelin-core`, `voelin-model`, `voelin-observer`,