diff options
Diffstat (limited to 'src/services/jobs.ts')
-rw-r--r-- | src/services/jobs.ts | 3 |
1 files changed, 1 insertions, 2 deletions
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() { | |||
27 | } | 27 | } |
28 | 28 | ||
29 | async function handlePost(post: e621.Post) { | 29 | async function handlePost(post: e621.Post) { |
30 | const source = post.sources.length ? post.sources[0] : undefined; | ||
31 | const cws = config.cw.filter((w) => post.tags.general.includes(w)); | 30 | const cws = config.cw.filter((w) => post.tags.general.includes(w)); |
32 | 31 | ||
33 | console.log(`Downloading image...`); | 32 | console.log(`Downloading image...`); |
@@ -53,7 +52,7 @@ async function handlePost(post: e621.Post) { | |||
53 | 52 | ||
54 | console.log(`Posting status...`); | 53 | console.log(`Posting status...`); |
55 | 54 | ||
56 | const status = await mastodon.createStatus(`https://e926.net/posts/${post.id}`, source, cws, attachment.id); | 55 | const status = await mastodon.createStatus(`https://e926.net/posts/${post.id}`, post.sources, cws, attachment.id); |
57 | 56 | ||
58 | console.log(`Done! ${status.url}`); | 57 | console.log(`Done! ${status.url}`); |
59 | } | 58 | } |