Ensure that non-ACIs are excluded from the blocked UUIDs list

This commit is contained in:
Scott Nonnenberg 2024-10-10 09:20:57 +10:00 committed by GitHub
parent 42cc5e0013
commit adcf2212e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 6 deletions

View file

@ -2,12 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationAttributesType } from '../model-types';
import { isAciString } from './isAciString';
export function isBlocked(
attributes: Pick<ConversationAttributesType, 'e164' | 'groupId' | 'serviceId'>
): boolean {
const { e164, groupId, serviceId } = attributes;
if (serviceId) {
if (isAciString(serviceId)) {
return window.storage.blocked.isServiceIdBlocked(serviceId);
}