Set Accept-Language at the connection level for chat connections

This commit is contained in:
Jordan Rose
2025-07-09 10:57:01 -07:00
committed by GitHub
parent 3063262730
commit b440aec88c
7 changed files with 41 additions and 54 deletions

View File

@@ -48,7 +48,6 @@ import { isValidTapToView } from '../util/isValidTapToView';
import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage';
import { getMessageAuthorText } from '../util/getMessageAuthorText';
import { GiftBadgeStates } from '../components/conversation/Message';
import { getUserLanguages } from '../util/userLanguages';
import { parseBoostBadgeListFromServer } from '../badges/parseBadgesFromServer';
import { SignalService as Proto } from '../protobuf';
import {
@@ -761,16 +760,11 @@ export async function handleDataMessage(
typeof updatesUrl === 'string',
'getProfile: expected updatesUrl to be a defined string'
);
const userLanguages = getUserLanguages(
window.SignalContext.getPreferredSystemLocales(),
window.SignalContext.getResolvedMessagesLocale()
);
const { messaging } = window.textsecure;
if (!messaging) {
throw new Error(`${idLog}: messaging is not available`);
}
const response =
await messaging.server.getSubscriptionConfiguration(userLanguages);
const response = await messaging.server.getSubscriptionConfiguration();
const boostBadgesByLevel = parseBoostBadgeListFromServer(
response,
updatesUrl