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.

Custom Social Media Cards → Custom Link Previews

Steven Teydce55f2d29b0
diff --git a/apps/web/.env.example b/apps/web/.env.example
index 7dc35fb1d3..3be3285c8a 100644
--- a/apps/web/.env.example
+++ b/apps/web/.env.example
@@ -87,7 +87,7 @@ EDGE_CONFIG_ID=
NEXT_PUBLIC_BITLY_CLIENT_ID=
BITLY_CLIENT_SECRET=
-# Used for Custom Social Media Cards feature
+# Used for Custom Link Previews feature
# Apply for an API key here: https://unsplash.com/developers
UNSPLASH_ACCESS_KEY=
diff --git a/apps/web/lib/api/links/plan-features-check.ts b/apps/web/lib/api/links/plan-features-check.ts
index 70efd9577c..eb13ac6a8e 100644
--- a/apps/web/lib/api/links/plan-features-check.ts
+++ b/apps/web/lib/api/links/plan-features-check.ts
@@ -29,7 +29,7 @@ export const proFeaturesCheck = (payload: NewLinkProps) => {
) {
const proFeaturesString = combineWords(
[
- proxy && "custom social media cards",
+ proxy && "custom link previews",
password && "password protection",
rewrite && "link cloaking",
expiresAt && "link expiration",
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 0a9bb8f67c..27448a104e 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -340,31 +340,31 @@ export const createLinkBodySchema = z.object({
.boolean()
.optional()
.describe(
- "Whether the short link uses Custom Social Media Cards feature. Defaults to `false` if not provided.",
+ "Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.",
),
title: z
.string()
.nullish()
.describe(
- "The custom link preview title (og:title). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og",
+ "The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og",
),
description: z
.string()
.nullish()
.describe(
- "The custom link preview description (og:description). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og",
+ "The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og",
),
image: z
.string()
.nullish()
.describe(
- "The custom link preview image (og:image). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og",
+ "The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og",
),
video: z
.string()
.nullish()
.describe(
- "The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og",
+ "The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og",
),
rewrite: z
.boolean()
@@ -557,32 +557,30 @@ export const LinkSchema = z
proxy: z
.boolean()
.default(false)
- .describe(
- "Whether the short link uses Custom Social Media Cards feature.",
- ),
+ .describe("Whether the short link uses Custom Link Previews feature."),
title: z
.string()
.nullable()
.describe(
- "The title of the short link. Will be used for Custom Social Media Cards if `proxy` is true.",
+ "The title of the short link. Will be used for Custom Link Previews if `proxy` is true.",
),
description: z
.string()
.nullable()
.describe(
- "The description of the short link. Will be used for Custom Social Media Cards if `proxy` is true.",
+ "The description of the short link. Will be used for Custom Link Previews if `proxy` is true.",
),
image: z
.string()
.nullable()
.describe(
- "The image of the short link. Will be used for Custom Social Media Cards if `proxy` is true.",
+ "The image of the short link. Will be used for Custom Link Previews if `proxy` is true.",
),
video: z
.string()
.nullable()
.describe(
- "The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og",
+ "The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og",
),
rewrite: z
.boolean()
diff --git a/apps/web/tests/links/create-link.test.ts b/apps/web/tests/links/create-link.test.ts
index 2e4b898948..fcfcf7253a 100644
--- a/apps/web/tests/links/create-link.test.ts
+++ b/apps/web/tests/links/create-link.test.ts
@@ -405,7 +405,7 @@ describe.sequential("POST /links", async () => {
});
});
- test("custom social media cards", async () => {
+ test("custom link previews", async () => {
const title = "custom title";
const description = "custom description";