diff --git a/packages/nicolium/src/features/draft-statuses/components/draft-status-action-bar.tsx b/packages/nicolium/src/features/draft-statuses/components/draft-status-action-bar.tsx index 26f7c7312..3f7cd0016 100644 --- a/packages/nicolium/src/features/draft-statuses/components/draft-status-action-bar.tsx +++ b/packages/nicolium/src/features/draft-statuses/components/draft-status-action-bar.tsx @@ -59,7 +59,14 @@ const DraftStatusActionBar: React.FC = ({ source, status const poll = status.poll_id ? queryClient.getQueryData(queryKeys.statuses.polls.show(status.poll_id)) : undefined; - setComposeToStatus(status, poll, source, false, source.draft_id, source.editorState); + setComposeToStatus( + status, + poll, + { ...source, location: null }, + false, + source.draft_id, + source.editorState, + ); openModal('COMPOSE'); }; diff --git a/packages/nicolium/src/queries/statuses/use-draft-statuses.ts b/packages/nicolium/src/queries/statuses/use-draft-statuses.ts index 4f6a4a991..d375e290f 100644 --- a/packages/nicolium/src/queries/statuses/use-draft-statuses.ts +++ b/packages/nicolium/src/queries/statuses/use-draft-statuses.ts @@ -24,6 +24,10 @@ const draftStatusSchema = v.pipe( in_reply_to: draft.inReplyTo, media_attachments: draft.mediaAttachments, spoiler_text: draft.spoilerText, + spoiler_text_map: draft.spoilerTextMap, + text: draft.text, + text_map: draft.textMap, + language: draft.language, ...draft, })), v.object({ @@ -39,7 +43,10 @@ const draftStatusSchema = v.pipe( schedule: v.fallback(v.nullable(v.string()), null), sensitive: v.fallback(v.boolean(), false), spoiler_text: v.fallback(v.string(), ''), + spoiler_text_map: v.fallback(v.nullable(v.record(v.string(), v.string())), null), text: v.fallback(v.string(), ''), + text_map: v.fallback(v.nullable(v.record(v.string(), v.string())), null), + language: v.fallback(v.string(), ''), }), ); diff --git a/packages/nicolium/src/stores/compose.ts b/packages/nicolium/src/stores/compose.ts index 00f1a2d9a..7d6191b70 100644 --- a/packages/nicolium/src/stores/compose.ts +++ b/packages/nicolium/src/stores/compose.ts @@ -325,7 +325,7 @@ interface ComposeActions { | 'visibility' >, poll: Poll | null | undefined, - source: Pick, + source: Omit, withRedraft?: boolean, draftId?: string | null, editorState?: string | null, @@ -431,6 +431,7 @@ const useComposeStore = create()( compose.editedId = status.id; } compose.text = source.text; + compose.textMap = source.text_map ?? {}; compose.to = mentions; compose.parentRebloggedById = null; compose.inReplyToId = status.in_reply_to_id; @@ -451,6 +452,7 @@ const useComposeStore = create()( compose.redacting = redacting ?? false; compose.spoilerText = source.spoiler_text; + compose.spoilerTextMap = source.spoiler_text_map ?? {}; if (poll) { compose.poll = newPoll({