Avatar cap to 256 KiB; idle warn only while ready

Private-server headroom over any pipeline PNG. The 8-min
auto-unready warning now mirrors the 10-min action guard: no toast
when self isn't ready, since there's nothing to lose.
This commit is contained in:
foxyz committed 2026-09-12 11:47:51 +03:00
1 parent 190faf63c0
commit 2760c823c0
4 files changed
+13 -8

No files matched your search

+5 -4
View File
@@ -15,13 +15,14 @@ abstract class RelayConstants {
static const int stateHeartbeatSecs = 1;
static const int pingIntervalSecs = 5;
// Base64-char count of the avatar string, enforced at hello. Sized so
// ANY 128x128 pipeline PNG always fits (raw bitmap <= 64 KiB, worst-case
// PNG ~70 KiB raw ~= 95 KiB base64). PNG keeps transparency; JPEG did not.
// Base64-char count of the avatar string, enforced at hello. 256 KiB
// leaves wide headroom over any 128x128 pipeline PNG (raw bitmap
// <= 64 KiB, worst-case base64 ~95 KiB chars) — deliberate over-size
// for private-server use. PNG keeps transparency; JPEG did not.
// Trade: avatars ride in the 1 Hz room broadcast, so worst-case host
// uplink scales with this cap. Follow-up (not now): send avatar bytes
// once, reference by hash afterwards.
static const int maxAvatarBytes = 128 * 1024;
static const int maxAvatarBytes = 256 * 1024;
static const int maxNameLength = 32;
static const int maxChatLength = 500;
}