activity:update and activity:clear went to every socket on /ws. The
connect handler accepts sockets with no login, so anyone could watch who
was playing what, with names and avatars, and a user with a ROM hidden
(directly, by platform, or by age rating) still saw sessions on it,
which GET /api/activity filters out.
Each event now goes to the user:{id} rooms of the enabled users who can
see its ROM, the room every logged-in socket joins on connect; nothing
is sent when no one can. Tests cover the audience across hidden ROMs,
hidden platforms, age limits, disabled users and clears.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PU9EuYhLpqR1DGMtmymr79