Init create/admin call links flow
This commit is contained in:
parent
53b8f5f152
commit
f19f0fb47d
31 changed files with 1256 additions and 149 deletions
|
@ -3,6 +3,7 @@
|
|||
import type { ReadonlyDeep } from 'type-fest';
|
||||
import { z } from 'zod';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { safeParseInteger } from '../util/numbers';
|
||||
|
||||
export enum CallLinkUpdateSyncType {
|
||||
Update = 'Update',
|
||||
|
@ -28,9 +29,9 @@ export enum CallLinkRestrictions {
|
|||
export const callLinkRestrictionsSchema = z.nativeEnum(CallLinkRestrictions);
|
||||
|
||||
export function toCallLinkRestrictions(
|
||||
restrictions: number
|
||||
restrictions: number | string
|
||||
): CallLinkRestrictions {
|
||||
return callLinkRestrictionsSchema.parse(restrictions);
|
||||
return callLinkRestrictionsSchema.parse(safeParseInteger(restrictions));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue