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.

Update transform.ts

Kiran K0a089ea3949b
diff --git a/apps/web/lib/integrations/slack/transform.ts b/apps/web/lib/integrations/slack/transform.ts
index 05fd624eef..b61680dd1d 100644
--- a/apps/web/lib/integrations/slack/transform.ts
+++ b/apps/web/lib/integrations/slack/transform.ts
@@ -287,6 +287,25 @@ const commissionCreatedTemplate = ({
};
};
+// Minimal bounty templates (safe defaults)
+const bountyCreatedTemplate = ({ /* data */ }: { data: unknown }) => ({
+ blocks: [
+ {
+ type: "section",
+ text: { type: "mrkdwn", text: "*New bounty created* :money_with_wings:" },
+ },
+ ],
+});
+
+const bountyUpdatedTemplate = ({ /* data */ }: { data: unknown }) => ({
+ blocks: [
+ {
+ type: "section",
+ text: { type: "mrkdwn", text: "*Bounty updated* :memo:" },
+ },
+ ],
+});
+
const slackTemplates: Record<WebhookTrigger, any> = {
"link.created": createLinkTemplate,
"link.updated": createLinkTemplate,
@@ -296,8 +315,8 @@ const slackTemplates: Record<WebhookTrigger, any> = {
"sale.created": createSaleTemplate,
"partner.enrolled": enrolledPartnerTemplate,
"commission.created": commissionCreatedTemplate,
- "bounty.created": () => {},
- "bounty.updated": () => {},
+ "bounty.created": bountyCreatedTemplate,
+ "bounty.updated": bountyUpdatedTemplate,
};
export const formatEventForSlack = (