From ece5115edbf890188523a51dfcd75f4a34098c08 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 22 Mar 2022 17:31:16 +0100 Subject: Include all sources in post --- src/api/mastodon/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/mastodon/index.ts') 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) { export async function createStatus( postUrl: string, - sourceUrl: string | undefined, + sourceUrls: readonly string[], spoiler: string[], attachmentId: string ) { let lines = [postUrl]; - if (sourceUrl) { - lines.push(`Source: ${sourceUrl}`); + for (let i = 0; i < sourceUrls.length; ++i) { + lines.push(`Source ${i + 1}: ${sourceUrls[i]}`); } const spoilerText = spoiler.length ? `CW: ${spoiler.join(", ")}` : undefined; -- cgit v1.2.3-70-g09d2