Filtered out sender from story Sent To list

This commit is contained in:
Alvaro 2022-09-22 13:03:50 -06:00 committed by GitHub
parent d911439f0f
commit 004abd44b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -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;