also looking at this
Long-form composer mode for the blog target
#10
7 files
+33
-8
| @@ -11,6 +11,7 @@ export default new Action({ | ||
| 11 | 11 | |
| 12 | 12 | async handle(request: RequestInstance) { |
| 13 | 13 | const text = String(request.get('text') || request.get('body') || '').trim() |
| 14 | const title = String(request.get('title') || '').trim() || undefined | |
| 14 | 15 | |
| 15 | 16 | const available = new Set<string>(crosspostProviders()) |
| 16 | 17 | const providers = String(request.get('providers') || request.get('provider') || '') |
| @@ -54,7 +55,7 @@ export default new Action({ | ||
| 54 | 55 | catch {} |
| 55 | 56 | |
| 56 | 57 | try { |
| 57 | const content = { external, media: media.length ? media : undefined } | |
| 58 | const content = { title, external, media: media.length ? media : undefined } | |
| 58 | 59 | const data = thread.length > 1 |
| 59 | 60 | ? await crosspost.publishThread(thread, providers, content) |
| 60 | 61 | : await crosspost.publish(thread[0] || text, providers, content) |