Large guilds that are not selected: PASSIVE_UPDATES is not handled (unread, voice states) #196

Open
opened 2026-11-12 03:34:34 +00:00 by charles · 0 comments
Owner

In a guild with more than 250 members a user session is passive until op 14 sets active: true for it (fluxer_docs/src/content/docs/gateway/event-filtering.md, "Active and passive guilds"; fluxer_gateway/src/session/session_passive.erl). The client (branch fix-member-list) makes the selected guild active, as the web app does; every other large guild stays passive, and a passive session gets only guild/role/channel updates, its own member events, voice states, messages that mention the user, and PASSIVE_UPDATES.

PASSIVE_UPDATES ({guild_id, channels: {channel_id: last_message_id}, voice_states?}, every 30 s when something changed) is untyped in fluxer-proto today, so in a large guild that is not selected:

  • channels do not turn unread (their last_message_id never moves), and
  • the voice states it carries are dropped (VOICE_STATE_UPDATE still arrives for viewable channels, so this is only the batched form).

The web app handles it in fluxer_app/src/features/gateway/events/EventRouter.ts (handlePassiveUpdates).

Also not modelled, for the same reason: GUILD_SYNC after a guild switches from passive to active is handled like GUILD_CREATE now, but TYPING_START in passive guilds follows the active flag (or typing), so typing shows only in the selected large guild, which matches the web app.

To do: type PASSIVE_UPDATES in fluxer-proto with a fixture, apply channels to Channel::last_message_id and voice_states to the voice states in fluxer-core; add a >250-member guild to a devserver scenario that sends it.

In a guild with more than 250 members a user session is *passive* until op 14 sets `active: true` for it (`fluxer_docs/src/content/docs/gateway/event-filtering.md`, "Active and passive guilds"; `fluxer_gateway/src/session/session_passive.erl`). The client (branch `fix-member-list`) makes the *selected* guild active, as the web app does; every other large guild stays passive, and a passive session gets only guild/role/channel updates, its own member events, voice states, messages that mention the user, and `PASSIVE_UPDATES`. `PASSIVE_UPDATES` (`{guild_id, channels: {channel_id: last_message_id}, voice_states?}`, every 30 s when something changed) is untyped in `fluxer-proto` today, so in a large guild that is not selected: - channels do not turn unread (their `last_message_id` never moves), and - the voice states it carries are dropped (VOICE_STATE_UPDATE still arrives for viewable channels, so this is only the batched form). The web app handles it in `fluxer_app/src/features/gateway/events/EventRouter.ts` (`handlePassiveUpdates`). Also not modelled, for the same reason: `GUILD_SYNC` after a guild switches from passive to active is handled like `GUILD_CREATE` now, but `TYPING_START` in passive guilds follows the active flag (or `typing`), so typing shows only in the selected large guild, which matches the web app. To do: type `PASSIVE_UPDATES` in `fluxer-proto` with a fixture, apply `channels` to `Channel::last_message_id` and `voice_states` to the voice states in `fluxer-core`; add a >250-member guild to a devserver scenario that sends it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#196
No description provided.