events

Sync Community Rooms

Cron-triggered endpoint that ensures the right number of voice chatrooms exist for each community hour that's currently active or about to start.

Authenticated by the INTERNAL_CRON_TOKEN shared secret (2026-09-18 route-auth review); test_every_route_answers.py had it listed as "cron trigger anyone can fire". It creates voice chatrooms, so an open version is a room-spam button. kubernetes/cronjobs/community-rooms-sync.yaml now sends the header from the fluentea-secrets secret.

Logic per event:

  1. Skip if we're not within the [start - lead, start + duration] window.
  2. Count confirmed RSVPs for the upcoming/current occurrence.
  3. Compute desired room count: max(1, ceil(rsvp_count / TARGET_PER_ROOM)).
  4. Count existing chatrooms already auto-created for this occurrence (matched by activity_config.community_event_id).
  5. Create the difference, all with activity_type=canasta and the right language.

Idempotent — safe to call repeatedly. Uses activity_config.community_event_id as the dedup key so we don't double-spawn within a single occurrence.

post/events/community-rooms/sync

Headers

x-internal-tokenstring nullable

Response

Successful Response

{"stackTrail":"paths:/events/community-rooms/sync:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

Changed in 1 of the 25 revisions of this API.2

    • ○

      added the new optional header request parameter x-internal-token

      new-optional-request-parameter

    • ○

      added the non-success response with the status

      response-non-success-status-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 25 revisions, 1 has no diff computed.