Skip to content

Invite ticket buyers to the in-person event via Attend#65

Open
EDRipper wants to merge 1 commit into
mainfrom
attend-ticket-invite
Open

Invite ticket buyers to the in-person event via Attend#65
EDRipper wants to merge 1 commit into
mainfrom
attend-ticket-invite

Conversation

@EDRipper

Copy link
Copy Markdown
Collaborator

Summary

  • Buying the "Ticket to beest" shop item (1682f145-2f18-41f8-9267-7b3eb506b54a) now fires a best-effort call to Attend's POST /api/v1/events/beest/participants so the buyer gets an onboarding invite email.
  • New AttendService (backend/src/attend/) follows the same config-driven, fail-silent pattern as SlackNotifyService/SiloService — degrades silently (with a startup warning log) if unconfigured, never throws, a 409 (already invited) counts as success.
  • Wired into ShopService.purchase()'s existing post-commit side-effect block (same place the Slack DM and Loops date-sync already fire), gated on a new ATTEND_TICKET_SHOP_ITEM_ID env var so it only fires for the actual ticket item.

New env vars (need to be set for this to activate)

  • ATTEND_BASE_URL (e.g. https://attend.hackclub.com)
  • ATTEND_API_KEY (event-scoped API key, from attend admin → event → regenerate api key)
  • ATTEND_EVENT_ID (beest)
  • ATTEND_TICKET_SHOP_ITEM_ID (1682f145-2f18-41f8-9267-7b3eb506b54a)

Test plan

  • attend.service.spec.ts — unit tests for the new service (config-missing no-op, success, 409-as-success, network failure swallowed)
  • full backend test suite: 86/86 passing
  • build clean
  • lint clean

Buying the "Ticket to beest" shop item now fires a best-effort call to
Attend's participants API so the buyer gets an onboarding invite email,
following the same fire-and-forget pattern as the existing Slack/Loops
purchase side effects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant