Skip to content

IE.6: Meeting Invitations and Updates

Summary

When a meeting is scheduled, Compath creates meeting invitation records for relationship clients, internal invitees, and external email invitees. It can send scheduled or instant meeting invitation emails, push in-app notifications to internal invitees, create a meeting conversation, sync the event to connected calendars, and provide an ICS download. Booking-created meetings skip meeting invitation emails because booking email flows send their own notifications.

Role

  • Primary: Counselor, Client, Guest
  • Secondary: System, Resend, Calendar provider

Entry Point

  • Counselor session scheduling UI
  • Instant meeting UI
  • Meeting details update actions
  • API: POST /api/v1/meetings, PATCH /api/v1/meetings/:id, GET /api/v1/meetings/:id/invitation

Preconditions

  • Host is authenticated and authorized to schedule/update the meeting.
  • Invitees are either linked through a relationship, internal user IDs, or external email addresses.
  • Email client is required for meeting invitation/update emails.
  • Calendar sync requires a connected calendar.

Steps

  1. Host schedules a meeting.
  2. Backend resolves invitee emails into internal users and external email invitees when possible.
  3. Backend creates the meeting and its meeting link.
  4. Backend creates meeting invitation rows for the relationship client, internal invitees, and external invitees.
  5. Unless SkipInvitationEmails is true, backend sends scheduled_meeting_invitation or instant_meeting_invitation emails.
  6. Backend sends in-app meeting_scheduled notifications to internal invitees.
  7. Backend creates a conversation for meeting chat.
  8. Backend notifies calendar sync to create/update/delete connected calendar events.
  9. If the meeting is updated, backend detects changes, sends meeting_updated emails to external invitees, and sends in-app update notifications to internal invitees.
  10. A user with meeting access can download an .ics invitation from /meetings/:id/invitation.

Diagram

Edge Cases

  • Email client missing: Meeting invitation emails are skipped and logged.
  • Template missing: The affected invite email is skipped and logged.
  • Registered external email: Backend converts registered external invitees into internal invitees and reconciles the meeting invitee lists.
  • Booking-created meeting: Booking flow sets SkipInvitationEmails: true to avoid duplicate invite emails.
  • No update changes: Update notification sending is skipped when no user-facing fields changed.
  • ICS restrictions: ICS generation rejects cancelled or ended meetings and checks host/invitee/participant access.
  • Calendar writes: Current code uses GoogleProvider.PushEvent/UpdateEvent/DeleteEvent with event attendees. The older google_relay.go service-account relay referenced in repo instructions is not present in the current tree.

Current Implementation Notes

  • Backend: backend/internal/services/meeting_service.go, backend/internal/handlers/meeting_handler.go, backend/internal/calendar/google_provider.go
  • Templates: backend/scripts/seed_email_templates.sql, backend/scripts/seed_notification_templates.sql

Screenshot Status

  • Not captured.