Scheduling infrastructure for absolutely everyone.
fix: Create dub links if valid url (#18588)
Joe Au-Yeunge7df1ef493fc
diff --git a/packages/features/ee/workflows/lib/reminders/utils.ts b/packages/features/ee/workflows/lib/reminders/utils.tsindex 1e78cbcda3b..d60ea2c57a7 100644--- a/packages/features/ee/workflows/lib/reminders/utils.ts+++ b/packages/features/ee/workflows/lib/reminders/utils.ts@@ -1,7 +1,10 @@import { dub } from "@calcom/features/auth/lib/dub";export const bulkShortenLinks = async (links: string[]) => {- const results = await dub.links.createMany(links.map((link) => ({ domain: "sms.cal.com", url: link })));+ const linksToShorten = links.filter((link) => link !== "");+ const results = await dub.links.createMany(+ linksToShorten.map((link) => ({ domain: "sms.cal.com", url: link }))+ );return links.map((link) => {const createdLink = results.find((result) => result.url === link);