diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 5cfddfde683210..6ea9bb065e60e4 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -95,7 +95,7 @@ const makeMapStateToProps = () => { if (status) { ancestorsIds = getAncestorsIds(state, status.get('in_reply_to_id')); descendantsIds = getDescendantsIds(state, status.get('id')); - referencesIds = getReferencesIds(state, status.get('id')); + referencesIds = getReferencesIds(state, status.get('id'), status.getIn(['quote', 'quoted_status'])); } return { diff --git a/app/javascript/mastodon/selectors/contexts.ts b/app/javascript/mastodon/selectors/contexts.ts index e17d7e472220d4..f6d38f922e7024 100644 --- a/app/javascript/mastodon/selectors/contexts.ts +++ b/app/javascript/mastodon/selectors/contexts.ts @@ -94,8 +94,12 @@ export const getDescendantsIds = createAppSelector( ); export const getReferencesIds = createAppSelector( - [(_, id: string) => id, (state) => state.contexts.references], - (statusId, references) => { - return references[statusId] ?? []; + [ + (_, id: string) => id, + (state) => state.contexts.references, + (_, __, exceptId: string) => exceptId, + ], + (statusId, references, exceptId) => { + return references[statusId]?.filter((id) => exceptId !== id) ?? []; }, );