Move common utils out of conversation view

This commit is contained in:
Josh Perez 2021-09-27 12:29:00 -04:00 committed by GitHub
parent 9791fa43ef
commit 9888e6d38f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 38 deletions

View file

@ -0,0 +1,10 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationModel } from '../models/conversations';
export async function markAllAsApproved(
untrusted: ReadonlyArray<ConversationModel>
): Promise<void> {
await Promise.all(untrusted.map(contact => contact.setApproved()));
}