diff options
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; |