Appearance
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
- Host schedules a meeting.
- Backend resolves invitee emails into internal users and external email invitees when possible.
- Backend creates the meeting and its meeting link.
- Backend creates meeting invitation rows for the relationship client, internal invitees, and external invitees.
- Unless
SkipInvitationEmailsis true, backend sendsscheduled_meeting_invitationorinstant_meeting_invitationemails. - Backend sends in-app
meeting_schedulednotifications to internal invitees. - Backend creates a conversation for meeting chat.
- Backend notifies calendar sync to create/update/delete connected calendar events.
- If the meeting is updated, backend detects changes, sends
meeting_updatedemails to external invitees, and sends in-app update notifications to internal invitees. - A user with meeting access can download an
.icsinvitation 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: trueto 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/DeleteEventwith event attendees. The oldergoogle_relay.goservice-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.