* feat: Add async spam check integration and decoy booking response - Integrate SpamCheckService with handleNewBooking workflow - Implement parallel spam check execution for minimal performance impact - Add decoy booking response with localStorage-based success page - Extract organization ID from event type for org-specific blocking - Add comprehensive test coverage for spam detection scenarios - Create reusable components for booking success cards - Implement fail-open behavior to never block legitimate bookings This builds on the spam blocker DI infrastructure from PR #24040 by adding the actual integration into the booking flow and implementing the decoy response mechanism to avoid revealing spam detection to malicious actors. Related: #24040 Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com> * Do checks in paralle * Fix leaking host name in title * Reduce expoiry time localstorage --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
12 lines
743 B
TypeScript
12 lines
743 B
TypeScript
import type { GlobalBlockingService } from "@calcom/features/watchlist/lib/service/GlobalBlockingService";
|
|
import type { OrganizationBlockingService } from "@calcom/features/watchlist/lib/service/OrganizationBlockingService";
|
|
import { SpamCheckService } from "@calcom/features/watchlist/lib/service/SpamCheckService";
|
|
|
|
import { getGlobalBlockingService, getOrganizationBlockingService } from "./watchlist";
|
|
|
|
export const getSpamCheckService = (): SpamCheckService => {
|
|
const globalBlockingService = getGlobalBlockingService() as GlobalBlockingService;
|
|
const organizationBlockingService = getOrganizationBlockingService() as OrganizationBlockingService;
|
|
return new SpamCheckService(globalBlockingService, organizationBlockingService);
|
|
};
|