Skip to content

Commit

Permalink
Fix User Agent issue in some device (#8049)
Browse files Browse the repository at this point in the history
* Remove deviceName from User Agent

* Use modelName for User Agent
  • Loading branch information
ckaznable committed Jul 3, 2024
1 parent 1f6194d commit 331d313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/managers/network_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type APIClientConfiguration,
} from '@mattermost/react-native-network-client';
import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application';
import {deviceName, osName, osVersion} from 'expo-device';
import {modelName, osName, osVersion} from 'expo-device';
import {Alert, DeviceEventEmitter} from 'react-native';
import urlParse from 'url-parse';

Expand Down Expand Up @@ -99,7 +99,7 @@ class NetworkManager {
};

private buildConfig = async () => {
const userAgent = `Mattermost Mobile/${nativeApplicationVersion}+${nativeBuildVersion} (${osName}; ${osVersion}; ${deviceName})`;
const userAgent = `Mattermost Mobile/${nativeApplicationVersion}+${nativeBuildVersion} (${osName}; ${osVersion}; ${modelName})`;
const managedConfig = ManagedApp.enabled ? Emm.getManagedConfig<ManagedConfig>() : undefined;
const headers: Record<string, string> = {
[ClientConstants.HEADER_USER_AGENT]: userAgent,
Expand Down

0 comments on commit 331d313

Please sign in to comment.