feat: separate metions lines on replying

This commit is contained in:
Anthony Fu 2023-01-13 01:33:04 +01:00
parent 9476d14d6c
commit 9571d7338a
4 changed files with 17 additions and 6 deletions

View file

@ -23,9 +23,13 @@ export const usePublish = (options: {
})
async function publishDraft() {
let content = htmlToText(draft.params.status || '')
if (draft.mentions?.length)
content = `${draft.mentions.map(i => `@${i}`).join(' ')} ${content}`
const payload = {
...draft.params,
status: htmlToText(draft.params.status || ''),
status: content,
mediaIds: draft.attachments.map(a => a.id),
...(isGlitchEdition.value ? { 'content-type': 'text/markdown' } : {}),
} as mastodon.v1.CreateStatusParams