Move common utils out of conversation view
This commit is contained in:
parent
9791fa43ef
commit
9888e6d38f
4 changed files with 46 additions and 38 deletions
10
ts/util/markAllAsApproved.ts
Normal file
10
ts/util/markAllAsApproved.ts
Normal 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()));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue