Skip to content

Per-community Google Calendar ID for Avails event auto-creation #12

@zhiganov

Description

@zhiganov

Context

Avails is shipping v1 of Google Calendar event auto-creation on schedule (see avails spec). In v1, the poll creator picks a writable calendar from a dropdown at schedule time; their choice is remembered in localStorage.

This issue is the deferred follow-up: let community admins pre-configure a default shared calendar per community, so that polls associated with that community default to writing into the right calendar without the creator picking each time.

Proposal

Extend the per-community config (today scenius-digest/groups.json, soon to be exposed via this project's GET /api/config#9) with a new field:

{
  "sensemaking-scenius": {
    "telegram": { ... },
    "googleCalendar": {
      "id": "sensemakingscenius@gmail.com",
      "displayName": "Sensemaking Scenius"
    }
  }
}

Avails would then:

  • Look up the calendar ID for the community a poll is associated with.
  • Default-select it in the schedule-time dropdown.
  • Show "Writing to Sensemaking Scenius community calendar" copy on the confirmation step.

Prerequisites

  • Polls must be associated with a community at creation time. Today the link is post-hoc via share_poll. This issue depends on that association existing — likely via the same selector used for share_poll.
  • Expose GET /api/config endpoint for scenius-digest and Avails #9 (GET /api/config) — Avails reads from this endpoint.

Why deferred

The shared-calendar permission model already works in v1 without any of this — a creator who has write access to the community calendar can just pick it from their dropdown. The convenience of "don't make the creator pick" only pays off once communities are formal first-class objects in Avails. Worth doing later, not blocking on now.

Out of scope here

  • Granting Avails server-side write access to community calendars (i.e., service account flow). v1 uses creator-OAuth inheritance and that's expected to remain the default.
  • Updating/cancelling Google events when a poll is re-scheduled (separate concern; needs lexicon change in Avails).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions