diff options
author | Volpeon <git@volpeon.ink> | 2022-12-16 19:36:27 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-12-16 19:36:27 +0100 |
commit | b25d9869e50f9dda2082bbc1cab7144bce1808b8 (patch) | |
tree | 8bd817ddfbd301248d25b8fee5329e3b7f270dcb /src/api/mastodon | |
parent | cw creepy (diff) | |
download | feralbot-b25d9869e50f9dda2082bbc1cab7144bce1808b8.tar.gz feralbot-b25d9869e50f9dda2082bbc1cab7144bce1808b8.tar.bz2 feralbot-b25d9869e50f9dda2082bbc1cab7144bce1808b8.zip |
Replace Twitter -> Nitter
Diffstat (limited to 'src/api/mastodon')
-rw-r--r-- | src/api/mastodon/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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( | |||
40 | ) { | 40 | ) { |
41 | let lines = [postUrl]; | 41 | let lines = [postUrl]; |
42 | for (let i = 0; i < sourceUrls.length; ++i) { | 42 | for (let i = 0; i < sourceUrls.length; ++i) { |
43 | lines.push(`Source ${i + 1}: ${sourceUrls[i]}`); | 43 | const url = sourceUrls[i].replace(/(https?):\/\/twitter.com\//, "$1://nitter.net/"); |
44 | lines.push(`Source ${i + 1}: ${url}`); | ||
44 | } | 45 | } |
45 | 46 | ||
46 | const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; | 47 | const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; |