signal-desktop/ts/util/normalizeUuid.ts

15 lines
358 B
TypeScript
Raw Normal View History

2021-06-22 14:46:42 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { isValidGuid } from './isValidGuid';
export function normalizeUuid(uuid: string, context: string): string {
if (!isValidGuid(uuid)) {
window.log.warn(
`Normalizing invalid uuid: ${uuid} in context "${context}"`
);
}
return uuid.toLowerCase();
}