fix: use html content for redrafting
parent
ca1b7169f1
commit
d62292d219
|
@ -71,8 +71,8 @@ const deleteAndRedraft = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCachedStatus(status.id)
|
removeCachedStatus(status.id)
|
||||||
const { text } = await masto.statuses.remove(status.id)
|
await masto.statuses.remove(status.id)
|
||||||
openPublishDialog('dialog', await getDraftFromStatus(status, text), true)
|
openPublishDialog('dialog', await getDraftFromStatus(status), true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const reply = () => {
|
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({
|
return getDefaultDraft({
|
||||||
status: text || await convertMastodonHTML(status.content),
|
status: await convertMastodonHTML(status.content),
|
||||||
mediaIds: status.mediaAttachments.map(att => att.id),
|
mediaIds: status.mediaAttachments.map(att => att.id),
|
||||||
visibility: status.visibility,
|
visibility: status.visibility,
|
||||||
attachments: status.mediaAttachments,
|
attachments: status.mediaAttachments,
|
||||||
|
|
Loading…
Reference in New Issue