mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Find by username: Don't automatically add .01 discriminator
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
import type { SmartDraftGifMessageSendModalProps } from '../state/smart/DraftGifMessageSendModal.preload.js';
|
||||
import { CriticalIdlePrimaryDeviceModal } from './CriticalIdlePrimaryDeviceModal.dom.js';
|
||||
import { LowDiskSpaceBackupImportModal } from './LowDiskSpaceBackupImportModal.dom.js';
|
||||
import { isUsernameValid } from '../util/Username.dom.js';
|
||||
|
||||
// NOTE: All types should be required for this component so that the smart
|
||||
// component gives you type errors when adding/removing props.
|
||||
@@ -392,6 +393,13 @@ export function GlobalModalContainer({
|
||||
content = i18n('icu:startConversation--phone-number-not-found', {
|
||||
phoneNumber: userNotFoundModalState.phoneNumber,
|
||||
});
|
||||
} else if (
|
||||
userNotFoundModalState.type === 'username' &&
|
||||
!isUsernameValid(userNotFoundModalState.username)
|
||||
) {
|
||||
content = i18n('icu:startConversation--username-not-valid', {
|
||||
atUsername: userNotFoundModalState.username,
|
||||
});
|
||||
} else if (userNotFoundModalState.type === 'username') {
|
||||
content = i18n('icu:startConversation--username-not-found', {
|
||||
atUsername: userNotFoundModalState.username,
|
||||
|
||||
Reference in New Issue
Block a user