mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Avatar defaults and colors
This commit is contained in:
14
ts/util/createAvatarData.ts
Normal file
14
ts/util/createAvatarData.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { AvatarDataType } from '../types/Avatar';
|
||||
|
||||
export function createAvatarData(
|
||||
partialAvatarData: Readonly<Omit<AvatarDataType, 'id'>>
|
||||
): AvatarDataType {
|
||||
return {
|
||||
id: uuid(),
|
||||
...partialAvatarData,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user