Skip to content

fix: don't remind platform users in reminder cron#20056

Merged
ThyMinimalDev merged 3 commits into
mainfrom
fix-booking-reminder-cron-for-platform-managed-user
Mar 17, 2025
Merged

fix: don't remind platform users in reminder cron#20056
ThyMinimalDev merged 3 commits into
mainfrom
fix-booking-reminder-cron-for-platform-managed-user

Conversation

@ThyMinimalDev
Copy link
Copy Markdown
Contributor

@ThyMinimalDev ThyMinimalDev commented Mar 13, 2025

What does this PR do?

The code filters a list of bookings, including those without user information, those with users not platform-managed, or platform-managed users where email reminders are getting reminded of the booking.

#19694

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Mar 13, 2025
@graphite-app graphite-app Bot requested a review from a team March 13, 2025 15:33
@dosubot dosubot Bot added bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working labels Mar 13, 2025
@ThyMinimalDev ThyMinimalDev requested a review from supalarry March 13, 2025 15:34
Comment on lines +75 to +80
const bookingsToRemind = bookings.filter(
(booking) =>
!booking.user ||
!booking.user.isPlatformManaged ||
(booking.user.isPlatformManaged && Boolean(booking.user.platformOAuthClients?.[0]?.areEmailsEnabled))
);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't remind platform users for which the oauth client has disabled emails

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2025 4:54pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2025 4:54pm

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Mar 13, 2025

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (03/13/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (03/17/25)

1 label was added to this PR based on Keith Williams's automation.

@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

@ThyMinimalDev ThyMinimalDev merged commit dd45d8c into main Mar 17, 2025
@ThyMinimalDev ThyMinimalDev deleted the fix-booking-reminder-cron-for-platform-managed-user branch March 17, 2025 21:00
ThyMinimalDev added a commit that referenced this pull request Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working core area: core, team members only platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants