mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-04 16:09:59 +00:00
fix: use html content for redrafting
This commit is contained in:
parent
ca1b7169f1
commit
d62292d219
2 changed files with 4 additions and 4 deletions
|
@ -71,8 +71,8 @@ const deleteAndRedraft = async () => {
|
|||
}
|
||||
|
||||
removeCachedStatus(status.id)
|
||||
const { text } = await masto.statuses.remove(status.id)
|
||||
openPublishDialog('dialog', await getDraftFromStatus(status, text), true)
|
||||
await masto.statuses.remove(status.id)
|
||||
openPublishDialog('dialog', await getDraftFromStatus(status), true)
|
||||
}
|
||||
|
||||
const reply = () => {
|
||||
|
|
|
@ -28,9 +28,9 @@ export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, '
|
|||
}
|
||||
}
|
||||
|
||||
export async function getDraftFromStatus(status: Status, text?: null | string): Promise<Draft> {
|
||||
export async function getDraftFromStatus(status: Status): Promise<Draft> {
|
||||
return getDefaultDraft({
|
||||
status: text || await convertMastodonHTML(status.content),
|
||||
status: await convertMastodonHTML(status.content),
|
||||
mediaIds: status.mediaAttachments.map(att => att.id),
|
||||
visibility: status.visibility,
|
||||
attachments: status.mediaAttachments,
|
||||
|
|
Loading…
Reference in a new issue