Title: feat(demo): auto-confirm demo bookings that came through the verified form and decline the rest by waleedlatif1 · Pull Request #9976 · simstudioai/sim · GitHub
Open Graph Title: feat(demo): auto-confirm demo bookings that came through the verified form and decline the rest by waleedlatif1 · Pull Request #9976 · simstudioai/sim
X Title: feat(demo): auto-confirm demo bookings that came through the verified form and decline the rest by waleedlatif1 · Pull Request #9976 · simstudioai/sim
Description: Summary The Cal.com demo event is public, so bots booked it directly and skipped the form. The event now requires confirmation, and a signed Cal.com webhook decides each request: Confirms it when the attendee's email passed the demo form's Turnstile check. Leaves it pending for manual review when the form ran without a checkable token, e.g. the widget was blocked. Declines it when no form submission vouches for the email. /api/demo-requests gains the same honeypot and Turnstile handling as /api/contact. It records the outcome per email in Redis, keyed by a SHA-256 hash, for 24h, consumed by the first booking that claims it. New /api/demo-requests/bookings webhook verifies x-cal-signature-256 (HMAC-SHA256 of the raw body) before acting. It calls Cal.com's confirm/decline API with one retry on network or 5xx errors. The demo form opens the calendar only after the server has recorded the request, so a booking can never outrun its record. The invisible challenge is capped at 5s, Turnstile mounts on first focus, and the sales email goes out in after(). The scheduler and its preload are unchanged. A failed record write answers 503 and the form shows an inline error. Webhook decisions are claimed per booking UID, so a repeated delivery reuses the first decision. /team and the upgrade page's sales button now go to /demo instead of the raw Cal.com link, so every booking path passes the form. New env: CAL_API_KEY and CAL_WEBHOOK_SECRET. With either unset, the webhook is off or leaves every request pending, so nothing is auto-declined. Type of Change New feature Testing biome on the changed files; type-check, audits and tests run in CI Manual plan once deployed: subscribe the webhook to BOOKING_REQUESTED on the demo event. Then book once through /demo (confirmed) and once through the raw Cal.com link (declined). Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA) 🤖 Generated with Claude Code
Open Graph Description: Summary The Cal.com demo event is public, so bots booked it directly and skipped the form. The event now requires confirmation, and a signed Cal.com webhook decides each request: Confirms it when...
X Description: Summary The Cal.com demo event is public, so bots booked it directly and skipped the form. The event now requires confirmation, and a signed Cal.com webhook decides each request: Confirms it when...
Opengraph URL: https://github.com/simstudioai/sim/pull/9976
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1acddbbf-5b90-d374-d6f7-a0be81342dd9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D40:41EE1:8AC618:C32720:6AFB6F04 |
| html-safe-nonce | f0a7fb37f41775918ba47c9e6cf79b7e30580f64bf0fe2170ae75eb065d8a7d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDQwOjQxRUUxOjhBQzYxODpDMzI3MjA6NkFGQjZGMDQiLCJ2aXNpdG9yX2lkIjoiNTc0NDg5OTkxNzA2NzU0NjM3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 44aaceaa4b3ab86d11e1ef7b47b066a6392194d1dc81038d1f6cc761aa83f0d2 |
| hovercard-subject-tag | pull_request:5289510353 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/9976/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary The Cal.com demo event is public, so bots booked it directly and skipped the form. The event now requires confirmation, and a signed Cal.com webhook decides each request: Confirms it when... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width