Support delete for call links
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
11fed7e7f8
commit
9a9f9495f1
67 changed files with 853 additions and 345 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
import { z } from 'zod';
|
||||
import Long from 'long';
|
||||
import { CallMode } from './Calling';
|
||||
import type { AciString } from './ServiceId';
|
||||
import { aciSchema } from './ServiceId';
|
||||
import { bytesToUuid } from '../util/uuidToBytes';
|
||||
|
@ -11,6 +10,13 @@ import { SignalService as Proto } from '../protobuf';
|
|||
import * as Bytes from '../Bytes';
|
||||
import { UUID_BYTE_SIZE } from './Crypto';
|
||||
|
||||
// These are strings (1) for the database (2) for Storybook.
|
||||
export enum CallMode {
|
||||
Direct = 'Direct',
|
||||
Group = 'Group',
|
||||
Adhoc = 'Adhoc',
|
||||
}
|
||||
|
||||
export enum CallType {
|
||||
Audio = 'Audio',
|
||||
Video = 'Video',
|
||||
|
|
|
@ -98,3 +98,7 @@ export const callLinkRecordSchema = z.object({
|
|||
expiration: z.number().int().nullable(),
|
||||
revoked: z.union([z.literal(1), z.literal(0)]),
|
||||
}) satisfies z.ZodType<CallLinkRecord>;
|
||||
|
||||
export function isCallLinkAdmin(callLink: CallLinkType): boolean {
|
||||
return callLink.adminKey != null;
|
||||
}
|
||||
|
|
|
@ -5,17 +5,10 @@ import type { AudioDevice, Reaction as CallReaction } from '@signalapp/ringrtc';
|
|||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { AciString, ServiceIdString } from './ServiceId';
|
||||
import type { CallLinkConversationType } from './CallLink';
|
||||
import type { CallMode } from './CallDisposition';
|
||||
|
||||
export const MAX_CALLING_REACTIONS = 5;
|
||||
export const CALLING_REACTIONS_LIFETIME = 4000;
|
||||
|
||||
// These are strings (1) for the database (2) for Storybook.
|
||||
export enum CallMode {
|
||||
Direct = 'Direct',
|
||||
Group = 'Group',
|
||||
Adhoc = 'Adhoc',
|
||||
}
|
||||
|
||||
// Speaker and Presentation mode have the same UI, but Presentation is only set
|
||||
// automatically when someone starts to present, and will revert to the previous view mode
|
||||
// once presentation is complete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue