signal-desktop/ts/util/Username.ts

16 lines
461 B
TypeScript
Raw Normal View History

2022-10-18 17:12:02 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as RemoteConfig from '../RemoteConfig';
import { parseIntWithFallback } from './parseIntWithFallback';
export function getMaxNickname(): number {
return parseIntWithFallback(
RemoteConfig.getValue('global.nicknames.max'),
32
);
}
export function getMinNickname(): number {
return parseIntWithFallback(RemoteConfig.getValue('global.nicknames.min'), 3);
}