also looking at this
UI polish, real queue + scheduling, Bluesky threads, live analytics, blog target
#8
54 files
+2036
-589
| @@ -35,8 +35,19 @@ export default new Action({ | ||
| 35 | 35 | ? [{ url: imageUrl, altText: imageAlt || undefined }] |
| 36 | 36 | : undefined |
| 37 | 37 | |
| 38 | // Optional multi-segment thread: JSON array of post texts. Segments are | |
| 39 | // reply-chained on providers that support it (Bluesky). | |
| 40 | let thread: string[] = [] | |
| 38 | 41 | try { |
| 39 | const data = await crosspost.publish(text, providers, { external, media }) | |
| 42 | const parsed = JSON.parse(String(request.get('thread') || '[]')) | |
| 43 | if (Array.isArray(parsed)) thread = parsed.map(value => String(value).trim()).filter(Boolean) | |
| 44 | } | |
| 45 | catch {} | |
| 46 | ||
| 47 | try { | |
| 48 | const data = thread.length > 1 | |
| 49 | ? await crosspost.publishThread(thread, providers, { external, media }) | |
| 50 | : await crosspost.publish(thread[0] || text, providers, { external, media }) | |
| 40 | 51 | // Surface a partial-failure (some targets failed) as a 207-style payload |
| 41 | 52 | // while still returning 200 so the client can report per-provider state. |
| 42 | 53 | const allFailed = data.results.length > 0 && data.results.every(result => !result.ok) |