signal-desktop/ts/util/createAvatarData.ts

15 lines
346 B
TypeScript
Raw Normal View History

2021-08-06 00:17:05 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { v4 as uuid } from 'uuid';
import type { AvatarDataType } from '../types/Avatar';
2021-08-06 00:17:05 +00:00
export function createAvatarData(
partialAvatarData: Readonly<Omit<AvatarDataType, 'id'>>
): AvatarDataType {
return {
id: uuid(),
...partialAvatarData,
};
}