From b25d9869e50f9dda2082bbc1cab7144bce1808b8 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 16 Dec 2022 19:36:27 +0100 Subject: Replace Twitter -> Nitter --- src/api/mastodon/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/api/mastodon/index.ts') diff --git a/src/api/mastodon/index.ts b/src/api/mastodon/index.ts index 13185ab..e834c4f 100644 --- a/src/api/mastodon/index.ts +++ b/src/api/mastodon/index.ts @@ -40,7 +40,8 @@ export async function createStatus( ) { let lines = [postUrl]; for (let i = 0; i < sourceUrls.length; ++i) { - lines.push(`Source ${i + 1}: ${sourceUrls[i]}`); + const url = sourceUrls[i].replace(/(https?):\/\/twitter.com\//, "$1://nitter.net/"); + lines.push(`Source ${i + 1}: ${url}`); } const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; -- cgit v1.2.3-70-g09d2