diff options
author | Volpeon <git@volpeon.ink> | 2022-03-22 17:31:16 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-03-22 17:31:16 +0100 |
commit | ece5115edbf890188523a51dfcd75f4a34098c08 (patch) | |
tree | f05c2fef15000410bda19fec3ad82563bfc076e8 /src/api/mastodon | |
parent | Add thigh_highs to blacklist (diff) | |
download | feralbot-ece5115edbf890188523a51dfcd75f4a34098c08.tar.gz feralbot-ece5115edbf890188523a51dfcd75f4a34098c08.tar.bz2 feralbot-ece5115edbf890188523a51dfcd75f4a34098c08.zip |
Include all sources in post
Diffstat (limited to 'src/api/mastodon')
-rw-r--r-- | src/api/mastodon/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/mastodon/index.ts b/src/api/mastodon/index.ts index 3bfe9c8..13185ab 100644 --- a/src/api/mastodon/index.ts +++ b/src/api/mastodon/index.ts | |||
@@ -34,13 +34,13 @@ export async function upload(buf: Buffer, filename: string) { | |||
34 | 34 | ||
35 | export async function createStatus( | 35 | export async function createStatus( |
36 | postUrl: string, | 36 | postUrl: string, |
37 | sourceUrl: string | undefined, | 37 | sourceUrls: readonly string[], |
38 | spoiler: string[], | 38 | spoiler: string[], |
39 | attachmentId: string | 39 | attachmentId: string |
40 | ) { | 40 | ) { |
41 | let lines = [postUrl]; | 41 | let lines = [postUrl]; |
42 | if (sourceUrl) { | 42 | for (let i = 0; i < sourceUrls.length; ++i) { |
43 | lines.push(`Source: ${sourceUrl}`); | 43 | lines.push(`Source ${i + 1}: ${sourceUrls[i]}`); |
44 | } | 44 | } |
45 | 45 | ||
46 | const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; | 46 | const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; |