Support for people banned from joining groups via link

This commit is contained in:
Scott Nonnenberg 2022-03-14 18:32:07 -07:00 committed by GitHub
parent 1b7496399b
commit f217730b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 455 additions and 108 deletions

15
ts/groups/util.ts Normal file
View file

@ -0,0 +1,15 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { SignalService as Proto } from '../protobuf';
const ACCESS_ENUM = Proto.AccessControl.AccessRequired;
export function isAccessControlEnabled(
accessControl: number | undefined
): boolean {
return (
accessControl === ACCESS_ENUM.ANY ||
accessControl === ACCESS_ENUM.ADMINISTRATOR
);
}