events

Sync Community Rooms

Changed on

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

Request

  • Base URL
    https://api.fluentea.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.fluentea.com/events/community-rooms/sync
  • Auth
    none declared

Headers

x-internal-tokenstring nullable

Response

Successful Response

unknown required

Changes

    • info

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

    • info

      added the non-success response with the status