Username Link QR Code

This commit is contained in:
Fedor Indutny
2023-07-20 05:14:08 +02:00
committed by GitHub
parent 68dfc46185
commit e1d2dbd8ff
50 changed files with 2187 additions and 120 deletions

View File

@@ -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;

View File

@@ -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;