Skip to content

fix: Get meeting attendee emails from users table#778

Merged
bokelley merged 1 commit into
mainfrom
bokelley/fix-meeting-attendee-emails
Jan 15, 2026
Merged

fix: Get meeting attendee emails from users table#778
bokelley merged 1 commit into
mainfrom
bokelley/fix-meeting-attendee-emails

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Fixed calendar invites not being sent for scheduled meetings
  • The working_group_memberships.user_email field is often NULL because it's not always populated when members are added
  • Updated the query to join with the users table to get the actual email, with fallback to cached value

Problem

When Addie scheduled a meeting:

  • ✅ Meeting created in database
  • ✅ 5 members invited
  • ❌ Calendar event created with attendeeCount: 0

The query was using working_group_memberships.user_email which was NULL for all members.

Solution

Changed the query to:

SELECT
  wgm.workos_user_id,
  COALESCE(u.email, wgm.user_email) as email,
  COALESCE(u.first_name || ' ' || u.last_name, wgm.user_name) as name
FROM working_group_memberships wgm
LEFT JOIN users u ON u.workos_user_id = wgm.workos_user_id
WHERE ...

Test plan

  • Schedule a meeting with Addie
  • Verify attendees have emails in the log output
  • Verify calendar invites are sent

🤖 Generated with Claude Code

The working_group_memberships.user_email field is often NULL because
it's not always populated when members are added. Updated the query
to join with the users table to get the actual email.

This fixes calendar invites not being sent because attendeeCount was 0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 54c13b4 into main Jan 15, 2026
6 checks passed
bokelley added a commit that referenced this pull request Jan 16, 2026
The working_group_memberships.user_email field is often NULL because
it's not always populated when members are added. Updated the query
to join with the users table to get the actual email.

This fixes calendar invites not being sent because attendeeCount was 0.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Jan 20, 2026
The working_group_memberships.user_email field is often NULL because
it's not always populated when members are added. Updated the query
to join with the users table to get the actual email.

This fixes calendar invites not being sent because attendeeCount was 0.

Co-authored-by: Claude Opus 4.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