Add PNI endpoints to WebAPI

This commit is contained in:
Fedor Indutny
2021-11-30 20:33:51 +01:00
committed by GitHub
parent 7c1ce3366d
commit 348012ef4c
17 changed files with 321 additions and 210 deletions

View File

@@ -3,7 +3,7 @@
import type { ThunkAction } from 'redux-thunk';
import type { StateType as RootStateType } from '../reducer';
import { getUserLanguages } from '../../util/userLanguages';
import { UUID } from '../../types/UUID';
import type { NoopActionType } from './noop';
@@ -51,13 +51,9 @@ function checkForAccount(
let hasAccount = false;
try {
await window.textsecure.messaging.getProfile(identifier, {
userLanguages: getUserLanguages(
navigator.languages,
window.getLocale()
),
});
hasAccount = true;
hasAccount = await window.textsecure.messaging.checkAccountExistence(
new UUID(identifier)
);
} catch (_error) {
// Doing nothing with this failed fetch
}