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/services/jobs.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/services') diff --git a/src/services/jobs.ts b/src/services/jobs.ts index 5ecae66..bb0c3e1 100644 --- a/src/services/jobs.ts +++ b/src/services/jobs.ts @@ -27,7 +27,6 @@ export async function postRandomPicture() { } async function handlePost(post: e621.Post) { - const source = post.sources.length ? post.sources[0] : undefined; const cws = config.cw.filter((w) => post.tags.general.includes(w)); console.log(`Downloading image...`); @@ -53,7 +52,7 @@ async function handlePost(post: e621.Post) { console.log(`Posting status...`); - const status = await mastodon.createStatus(`https://e926.net/posts/${post.id}`, source, cws, attachment.id); + const status = await mastodon.createStatus(`https://e926.net/posts/${post.id}`, post.sources, cws, attachment.id); console.log(`Done! ${status.url}`); } -- cgit v1.2.3-70-g09d2