diff --git a/.env.example b/.env.example index f6f6188a1b..520ce80b27 100644 --- a/.env.example +++ b/.env.example @@ -87,7 +87,7 @@ CRON_ENABLE_APP_SYNC=false # Application Key for symmetric encryption and decryption # must be 32 bytes for AES256 encryption algorithm -# You can use: `openssl rand -base64 24` to generate one +# You can use: `openssl rand -base64 32` to generate one CALENDSO_ENCRYPTION_KEY= # Intercom Config diff --git a/apps/ai/src/app/api/receive/route.ts b/apps/ai/src/app/api/receive/route.ts index 63d6e5d0e4..68bbc51168 100644 --- a/apps/ai/src/app/api/receive/route.ts +++ b/apps/ai/src/app/api/receive/route.ts @@ -88,7 +88,7 @@ export const POST = async (request: NextRequest) => { // User is not a cal.com user or is using an unverified email. if (!signature || !user) { await sendEmail({ - html: `Thanks for your interest in Cal.ai! To get started, Make sure you have a cal.com account with this email address.`, + html: `Thanks for your interest in Cal.ai! To get started, Make sure you have a cal.com account with this email address and then install Cal.ai here: go.cal.com/ai.`, subject: `Re: ${subject}`, text: `Thanks for your interest in Cal.ai! To get started, Make sure you have a cal.com account with this email address. You can sign up for an account at: https://cal.com/signup`, to: envelope.from, diff --git a/apps/api/lib/validations/webhook.ts b/apps/api/lib/validations/webhook.ts index 91d8560195..71219d2fa0 100644 --- a/apps/api/lib/validations/webhook.ts +++ b/apps/api/lib/validations/webhook.ts @@ -20,6 +20,7 @@ export const schemaWebhookCreateParams = z payloadTemplate: z.string().optional().nullable(), eventTypeId: z.number().optional(), userId: z.number().optional(), + secret: z.string().optional().nullable(), // API shouldn't mess with Apps webhooks yet (ie. Zapier) // appId: z.string().optional().nullable(), }) @@ -31,6 +32,7 @@ export const schemaWebhookEditBodyParams = schemaWebhookBaseBodyParams .merge( z.object({ eventTriggers: z.enum(WEBHOOK_TRIGGER_EVENTS).array().optional(), + secret: z.string().optional().nullable(), }) ) .partial() diff --git a/apps/api/pages/api/webhooks/[id]/_patch.ts b/apps/api/pages/api/webhooks/[id]/_patch.ts index 35c2810f39..fd0f8db3f5 100644 --- a/apps/api/pages/api/webhooks/[id]/_patch.ts +++ b/apps/api/pages/api/webhooks/[id]/_patch.ts @@ -51,6 +51,9 @@ import { schemaWebhookEditBodyParams, schemaWebhookReadPublic } from "~/lib/vali * eventTypeId: * type: number * description: The event type ID if this webhook should be associated with only that event type + * secret: + * type: string + * description: The secret to verify the authenticity of the received payload * tags: * - webhooks * externalDocs: diff --git a/apps/api/pages/api/webhooks/_post.ts b/apps/api/pages/api/webhooks/_post.ts index 2a99c903e8..8c36bcbcf6 100644 --- a/apps/api/pages/api/webhooks/_post.ts +++ b/apps/api/pages/api/webhooks/_post.ts @@ -49,6 +49,9 @@ import { schemaWebhookCreateBodyParams, schemaWebhookReadPublic } from "~/lib/va * eventTypeId: * type: number * description: The event type ID if this webhook should be associated with only that event type + * secret: + * type: string + * description: The secret to verify the authenticity of the received payload * tags: * - webhooks * externalDocs: diff --git a/apps/web/components/AppListCard.tsx b/apps/web/components/AppListCard.tsx index 7252a8ffc6..2f9547fbb7 100644 --- a/apps/web/components/AppListCard.tsx +++ b/apps/web/components/AppListCard.tsx @@ -60,14 +60,18 @@ export default function AppListCard(props: AppListCardProps) { const pathname = usePathname(); useEffect(() => { - if (shouldHighlight && highlight) { - const timer = setTimeout(() => { - setHighlight(false); + if (shouldHighlight && highlight && searchParams !== null && pathname !== null) { + timeoutRef.current = setTimeout(() => { const _searchParams = new URLSearchParams(searchParams); _searchParams.delete("hl"); - router.replace(`${pathname}?${_searchParams.toString()}`); + _searchParams.delete("category"); // this comes from params, not from search params + + setHighlight(false); + + const stringifiedSearchParams = _searchParams.toString(); + + router.replace(`${pathname}${stringifiedSearchParams !== "" ? `?${stringifiedSearchParams}` : ""}`); }, 3000); - timeoutRef.current = timer; } return () => { if (timeoutRef.current) { @@ -75,8 +79,7 @@ export default function AppListCard(props: AppListCardProps) { timeoutRef.current = null; } }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [highlight, pathname, router, searchParams, shouldHighlight]); return (