Call lobby join button text for call links requiring approval

This commit is contained in:
ayumi-signal 2024-04-29 14:31:44 -07:00 committed by GitHub
parent a0b4126b52
commit c531c64410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 80 additions and 10 deletions

View file

@ -1,5 +1,6 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { CallingConversationType } from '../../types/Calling';
import type { CallLinkType } from '../../types/CallLink';
import { CallLinkRestrictions } from '../../types/CallLink';
import { MONTH } from '../../util/durations/constants';
@ -24,3 +25,21 @@ export const FAKE_CALL_LINK_WITH_ADMIN_KEY: CallLinkType = {
roomId: 'c097eb04cc278d6bc7ed9fb2ddeac00dc9646ae6ddb38513dad9a8a4fe3c38f4',
rootKey: 'bpmc-mrgn-hntf-mffd-mndd-xbxk-zmgq-qszg',
};
export function getDefaultCallLinkConversation(
callLinkOverrideProps: Partial<CallLinkType> = {}
): CallingConversationType {
const { roomId: id, name: title } = {
...FAKE_CALL_LINK,
...callLinkOverrideProps,
};
return {
id,
type: 'callLink',
isMe: false,
title,
sharedGroupNames: [],
acceptedMessageRequest: true,
badges: [],
};
}