mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 07:58:46 +01:00
Admin Delete
Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import type { ConversationType } from '../state/ducks/conversations.preload.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.std.js';
|
||||
import { generateAci } from '../types/ServiceId.std.js';
|
||||
import type { GroupListItemConversationType } from '../components/conversationList/GroupListItem.dom.js';
|
||||
import { toBase64 } from '../Bytes.std.js';
|
||||
import { getRandomColor } from './getRandomColor.std.js';
|
||||
import { ConversationColors } from '../types/Colors.std.js';
|
||||
import { StorySendMode } from '../types/Stories.std.js';
|
||||
@@ -16,6 +17,12 @@ import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradi
|
||||
|
||||
const { sample } = lodash;
|
||||
|
||||
export function generateGroupId(): string {
|
||||
const bytes = new Uint8Array(32);
|
||||
crypto.getRandomValues(bytes);
|
||||
return toBase64(bytes);
|
||||
}
|
||||
|
||||
export const getAvatarPath = (): string =>
|
||||
sample([
|
||||
'/fixtures/kitten-1-64-64.jpg',
|
||||
@@ -83,7 +90,7 @@ export function getDefaultGroup(
|
||||
color: getRandomColor(),
|
||||
conversationColor: ConversationColors[0],
|
||||
groupDescription: casual.sentence,
|
||||
groupId: generateUuid(),
|
||||
groupId: generateGroupId(),
|
||||
groupLink: casual.url,
|
||||
groupVersion: 2,
|
||||
id: generateUuid(),
|
||||
|
||||
Reference in New Issue
Block a user