Replace uses of checkDeviceTrust
with getDeviceVerificationStatus
(#10663)
matrix-org/matrix-js-sdk#3287 and matrix-org/matrix-js-sdk#3303 added a new API called getDeviceVerificationStatus. Let's use it.
This commit is contained in:
parent
aa8c0f5cc7
commit
d7bb8043ea
22 changed files with 286 additions and 161 deletions
|
@ -324,6 +324,16 @@ export async function asyncEvery<T>(values: T[], predicate: (value: T) => Promis
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Async version of Array.some.
|
||||
*/
|
||||
export async function asyncSome<T>(values: T[], predicate: (value: T) => Promise<boolean>): Promise<boolean> {
|
||||
for (const value of values) {
|
||||
if (await predicate(value)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function filterBoolean<T>(values: Array<T | null | undefined>): T[] {
|
||||
return values.filter(Boolean) as T[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue