Username Link QR Code
This commit is contained in:
6
ts/types/Storage.d.ts
vendored
6
ts/types/Storage.d.ts
vendored
@@ -74,6 +74,7 @@ export type StorageAccessType = {
|
||||
hasRegisterSupportForUnauthenticatedDelivery: boolean;
|
||||
hasSetMyStoriesPrivacy: boolean;
|
||||
hasCompletedUsernameOnboarding: boolean;
|
||||
hasCompletedUsernameLinkOnboarding: boolean;
|
||||
hasCompletedSafetyNumberOnboarding: boolean;
|
||||
hasViewedOnboardingStory: boolean;
|
||||
hasStoriesDisabled: boolean;
|
||||
@@ -158,6 +159,11 @@ export type StorageAccessType = {
|
||||
subscriberCurrencyCode: string;
|
||||
displayBadgesOnProfile: boolean;
|
||||
keepMutedChatsArchived: boolean;
|
||||
usernameLinkColor: number;
|
||||
usernameLink: {
|
||||
entropy: Uint8Array;
|
||||
serverId: Uint8Array;
|
||||
};
|
||||
|
||||
// Deprecated
|
||||
'challenge:retry-message-ids': never;
|
||||
|
@@ -1,8 +1,6 @@
|
||||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { usernames } from '@signalapp/libsignal-client';
|
||||
|
||||
export type UsernameReservationType = Readonly<{
|
||||
username: string;
|
||||
previousUsername: string | undefined;
|
||||
@@ -27,7 +25,7 @@ export enum ConfirmUsernameResult {
|
||||
|
||||
export function getUsernameFromSearch(searchTerm: string): string | undefined {
|
||||
try {
|
||||
usernames.hash(searchTerm);
|
||||
window.SignalContext.usernames.hash(searchTerm);
|
||||
return searchTerm;
|
||||
} catch {
|
||||
return undefined;
|
||||
|
Reference in New Issue
Block a user