send along tags with api request

This commit is contained in:
Eric Bailey
2023-09-25 14:28:05 -05:00
parent 763edc8fb3
commit f9914d6ff6
4 changed files with 35 additions and 7 deletions
+2
View File
@@ -83,6 +83,7 @@ interface PostOpts {
knownHandles?: Set<string>
onStateChange?: (state: string) => void
langs?: string[]
tags?: string[]
}
export async function post(store: RootStoreModel, opts: PostOpts) {
@@ -264,6 +265,7 @@ export async function post(store: RootStoreModel, opts: PostOpts) {
embed,
langs,
labels,
tags: opts.tags?.filter(t => t.replace(/^#/, '')),
})
} catch (e: any) {
console.error(`Failed to create post: ${e.toString()}`)