From 004abd44b59248d52f7afd0837292e750caf7afa Mon Sep 17 00:00:00 2001 From: Alvaro <110414366+alvaro-signal@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:03:50 -0600 Subject: [PATCH] Filtered out sender from story Sent To list --- ts/components/StoryDetailsModal.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ts/components/StoryDetailsModal.tsx b/ts/components/StoryDetailsModal.tsx index 7c7bd705b..b8d9d5685 100644 --- a/ts/components/StoryDetailsModal.tsx +++ b/ts/components/StoryDetailsModal.tsx @@ -70,8 +70,14 @@ export const StoryDetailsModal = ({ timestamp, expirationTimestamp, }: PropsType): JSX.Element => { - const contactsBySendStatus = sendState - ? groupBy(sendState, contact => contact.status) + // the sender is included in the sendState data + // but we don't want to show the sender in the "Sent To" list + const actualRecipientsSendState = sendState?.filter( + s => s.recipient.id !== sender.id + ); + + const contactsBySendStatus = actualRecipientsSendState + ? groupBy(actualRecipientsSendState, contact => contact.status) : undefined; let content: JSX.Element;