Fix UI bug with self-add by username in groups

This commit is contained in:
Fedor Indutny
2023-11-08 00:45:33 +01:00
committed by GitHub
parent 41e89554fe
commit ca2b3bacce
8 changed files with 21 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ export type StatePropsType = {
i18n: LocalizerType;
theme: ThemeType;
maxGroupSize: number;
ourUsername: string | undefined;
searchTerm: string;
selectedContacts: ReadonlyArray<ConversationType>;
@@ -85,6 +86,7 @@ export function ChooseGroupMembersModal({
i18n,
maxGroupSize,
onClose,
ourUsername,
removeSelectedContact,
searchTerm,
selectedContacts,
@@ -110,6 +112,7 @@ export function ChooseGroupMembersModal({
isUsernameVisible =
Boolean(username) &&
username !== ourUsername &&
candidateContacts.every(contact => contact.username !== username);
}