Skip to content

Commit 4733aa9

Browse files
authored
fix: hide read receipts toggle for MLS groups [WPB-17937] (#19277)
1 parent e037a48 commit 4733aa9

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/script/components/Modals/GroupCreation/GroupCreationModal.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ const GroupCreationModal: React.FC<GroupCreationModalProps> = ({
9999

100100
const initialProtocol = protocolOptions.find(protocol => protocol.value === defaultProtocol)!;
101101

102+
const areReadReceiptsEnabled = defaultProtocol !== ConversationProtocol.MLS;
103+
102104
const [isShown, setIsShown] = useState<boolean>(false);
103105
const [selectedContacts, setSelectedContacts] = useState<User[]>([]);
104106
const [enableReadReceipts, setEnableReadReceipts] = useState<boolean>(false);
@@ -501,15 +503,17 @@ const GroupCreationModal: React.FC<GroupCreationModalProps> = ({
501503
toggleId="services"
502504
/>
503505
)}
504-
<InfoToggle
505-
className="modal-style"
506-
dataUieName="read-receipts"
507-
info={t('readReceiptsToggleInfo')}
508-
isChecked={enableReadReceipts}
509-
setIsChecked={setEnableReadReceipts}
510-
isDisabled={false}
511-
name={t('readReceiptsToggleName')}
512-
/>
506+
{areReadReceiptsEnabled && (
507+
<InfoToggle
508+
className="modal-style"
509+
dataUieName="read-receipts"
510+
info={t('readReceiptsToggleInfo')}
511+
isChecked={enableReadReceipts}
512+
setIsChecked={setEnableReadReceipts}
513+
isDisabled={false}
514+
name={t('readReceiptsToggleName')}
515+
/>
516+
)}
513517
{enableMLSToggle && (
514518
<>
515519
<Select

src/script/page/RightSidebar/ConversationDetails/components/ConversationDetailsOptions/ConversationDetailsOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const ConversationDetailsOptions = ({
119119
const showOptionTimedMessages = isActiveGroupParticipant && isSelfDeletingMessagesEnabled;
120120
const showOptionServices = isActiveGroupParticipant && isTeamConversation && !isMLSConversation(activeConversation);
121121
const showOptionNotifications1To1 = isMutable && !isGroup;
122-
const showOptionReadReceipts = isTeamConversation;
122+
const showOptionReadReceipts = isTeamConversation && !isMLSConversation(activeConversation);
123123

124124
const hasReceiptsEnabled = conversationRepository.expectReadReceipt(activeConversation);
125125

0 commit comments

Comments
 (0)