Display user badges

This commit is contained in:
Evan Hahn 2021-11-02 18:01:13 -05:00 committed by GitHub
parent 927c22ef73
commit f647c4e053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 2891 additions and 424 deletions

View file

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