Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Support more deep link protocols

Steven Tey765d33d19462
diff --git a/apps/web/lib/middleware/utils/is-supported-deeplink-protocol.ts b/apps/web/lib/middleware/utils/is-supported-deeplink-protocol.ts
index 60c554ec69..d178a6402d 100644
--- a/apps/web/lib/middleware/utils/is-supported-deeplink-protocol.ts
+++ b/apps/web/lib/middleware/utils/is-supported-deeplink-protocol.ts
@@ -1,3 +1,13 @@
+const supportedDeeplinkProtocols = [
+ "mailto:",
+ "tel:",
+ "sms:",
+ "whatsapp:",
+ "tg:",
+];
+
export const isSupportedDeeplinkProtocol = (url: string) => {
- return url.startsWith("mailto:") || url.startsWith("tel:");
+ return supportedDeeplinkProtocols.some((protocol) =>
+ url.startsWith(protocol),
+ );
};