diff --git a/packages/pl-api/lib/entities/status.ts b/packages/pl-api/lib/entities/status.ts index 50479e34c..f5985ea8a 100644 --- a/packages/pl-api/lib/entities/status.ts +++ b/packages/pl-api/lib/entities/status.ts @@ -152,6 +152,8 @@ const preprocess = (status: any) => { 'emoji_reactions', 'parent_visible', 'pinned_at', + 'quote_url', + 'quote_visible', 'quotes_count', 'bookmark_folder', 'list_id', diff --git a/packages/pl-fe/src/components/quoted-status-indicator.tsx b/packages/pl-fe/src/components/quoted-status-indicator.tsx index 66d951b41..7f054f5a5 100644 --- a/packages/pl-fe/src/components/quoted-status-indicator.tsx +++ b/packages/pl-fe/src/components/quoted-status-indicator.tsx @@ -8,20 +8,22 @@ import { makeGetStatus } from 'pl-fe/selectors'; interface IQuotedStatusIndicator { /** The quoted status id. */ - statusId: string; + statusId?: string; + /** The quoted status URL. */ + statusUrl?: string; } -const QuotedStatusIndicator: React.FC = ({ statusId }) => { +const QuotedStatusIndicator: React.FC = ({ statusId, statusUrl }) => { const getStatus = useCallback(makeGetStatus(), []); - const status = useAppSelector(state => getStatus(state, { id: statusId })); + statusUrl = useAppSelector(state => statusUrl || statusId && getStatus(state, { id: statusId })?.url); - if (!status) return null; + if (!statusUrl) return null; return ( - {status.url} + {statusUrl} ); }; diff --git a/packages/pl-fe/src/components/quoted-status.tsx b/packages/pl-fe/src/components/quoted-status.tsx index 14748a374..0edbed4e1 100644 --- a/packages/pl-fe/src/components/quoted-status.tsx +++ b/packages/pl-fe/src/components/quoted-status.tsx @@ -103,7 +103,7 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => isQuote /> - {status.quote_id && } + {status.quote_id && } {status.media_attachments.length > 0 && (