Stop /api/user-info renewing the TTL for idle users

Fixkamo-internal
Shipped
August 9, 2026 at 7:37 PM UTC
Author
kamo
Commit
32c6c84

This route writes the *** TTL straight to Redis, so it bypassed the gating in SecurityService, MediaService and ChatService entirely — and useUserInfo polls it every 5 minutes forever. On its own it kept every session alive all night after all three services had already stopped renewing for idle users. Caught with redis MONITOR: while the browser truthfully reported 107 minutes idle and SecurityService logged "Skipping sliding expiration", the kamo-internal pod was issuing `expire ***... 1800` against the same key seconds later. Gate it on the same X-Kamo-Idle-Ms signal via a shared helper, so the next route that renews the TTL directly has one obvious thing to call. Absent or malformed header still renews.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing