mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Move common utils out of conversation view
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { ConversationModel } from '../models/conversations';
|
||||
|
||||
export async function markAllAsVerifiedDefault(
|
||||
unverified: ReadonlyArray<ConversationModel>
|
||||
): Promise<void> {
|
||||
await Promise.all(
|
||||
unverified.map(contact => {
|
||||
if (contact.isUnverified()) {
|
||||
return contact.setVerifiedDefault();
|
||||
}
|
||||
|
||||
return null;
|
||||
})
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user