Synchronous delete call link

This commit is contained in:
ayumi-signal 2024-10-09 09:35:24 -07:00 committed by GitHub
parent e60df56500
commit 42cc5e0013
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 443 additions and 135 deletions

View file

@ -16,7 +16,7 @@ import type {
import { getIncomingCall as getIncomingCallHelper } from '../ducks/callingHelpers';
import type { PresentedSource } from '../../types/Calling';
import { CallMode } from '../../types/CallDisposition';
import type { CallLinkType } from '../../types/CallLink';
import { isCallLinkAdmin, type CallLinkType } from '../../types/CallLink';
import { getUserACI } from './user';
import { getOwn } from '../../util/getOwn';
import type { AciString } from '../../types/ServiceId';
@ -96,6 +96,11 @@ export const getAllCallLinks = createSelector(
(lookup): Array<CallLinkType> => Object.values(lookup)
);
export const getHasAnyAdminCallLinks = createSelector(
getAllCallLinks,
(callLinks): boolean => callLinks.some(callLink => isCallLinkAdmin(callLink))
);
export type CallSelectorType = (
conversationId: string
) => CallStateType | undefined;