More permissive username search

This commit is contained in:
Fedor Indutny 2024-02-14 10:18:49 -08:00 committed by GitHub
parent 89525d3e16
commit 4a41e87173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 121 additions and 31 deletions

View file

@ -18,7 +18,6 @@ import {
} from '../AddGroupMemberErrorDialog';
import { Button } from '../Button';
import type { LocalizerType } from '../../types/Util';
import { getUsernameFromSearch } from '../../types/Username';
import type { ParsedE164Type } from '../../util/libphonenumberInstance';
import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance';
import type { UUIDFetchStateType } from '../../util/uuidFetchState';
@ -38,6 +37,7 @@ export type LeftPaneChooseGroupMembersPropsType = {
ourUsername: string | undefined;
searchTerm: string;
regionCode: string | undefined;
username: string | undefined;
selectedContacts: Array<ConversationType>;
};
@ -80,6 +80,7 @@ export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper<LeftPaneCho
regionCode,
selectedContacts,
uuidFetchState,
username,
}: Readonly<LeftPaneChooseGroupMembersPropsType>) {
super();
@ -93,7 +94,6 @@ export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper<LeftPaneCho
isShowingRecommendedGroupSizeModal;
this.searchTerm = searchTerm;
const username = getUsernameFromSearch(searchTerm);
const isUsernameVisible =
username !== undefined &&
username !== ourUsername &&