mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-04 07:05:26 +01:00
Don't ring large groups
This commit is contained in:
14
ts/conversations/isConversationTooBigToRing.ts
Normal file
14
ts/conversations/isConversationTooBigToRing.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { parseIntWithFallback } from '../util/parseIntWithFallback';
|
||||
import { getValue } from '../RemoteConfig';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
|
||||
const getMaxGroupCallRingSize = (): number =>
|
||||
parseIntWithFallback(getValue('global.calling.maxGroupCallRingSize'), 16);
|
||||
|
||||
export const isConversationTooBigToRing = (
|
||||
conversation: Readonly<Pick<ConversationType, 'memberships'>>
|
||||
): boolean =>
|
||||
(conversation.memberships?.length || 0) >= getMaxGroupCallRingSize();
|
||||
Reference in New Issue
Block a user