Pass navigator.userAgent to MTProto worker
Update langPackVersion
This commit is contained in:
parent
d786a2c438
commit
0944509fec
@ -13,7 +13,7 @@ const App = {
|
||||
id: 1025907,
|
||||
hash: '452b0359b988148995f22ff0f4229750',
|
||||
version: '0.5.6',
|
||||
langPackVersion: '0.2.2',
|
||||
langPackVersion: '0.2.3',
|
||||
langPack: 'macos',
|
||||
langPackCode: 'en',
|
||||
domains: [] as string[],
|
||||
|
@ -82,6 +82,10 @@ const taskListeners = {
|
||||
|
||||
localStorageProxy: (task: LocalStorageProxyTask) => {
|
||||
sessionStorage.finishTask(task.id, task.payload);
|
||||
},
|
||||
|
||||
userAgent: (task: any) => {
|
||||
networkerFactory.userAgent = task.payload;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -265,6 +265,7 @@ export class ApiManagerProxy extends CryptoWorkerMethods {
|
||||
const isWebpSupported = webpWorkerController.isWebpSupported();
|
||||
this.log('WebP supported:', isWebpSupported);
|
||||
this.postMessage({type: 'webpSupport', payload: isWebpSupported});
|
||||
this.postMessage({type: 'userAgent', payload: navigator.userAgent});
|
||||
|
||||
this.releasePending();
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ export default class MTPNetworker {
|
||||
serializer.storeInt(+initConnection.id >>> 0, 'initConnection');
|
||||
serializer.storeInt(0x0, 'flags');
|
||||
serializer.storeInt(App.id, 'api_id');
|
||||
serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');
|
||||
serializer.storeString(networkerFactory.userAgent || 'Unknown UserAgent', 'device_model');
|
||||
serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');
|
||||
serializer.storeString(App.version + (App.isMainDomain ? ' ' + App.suffix : ''), 'app_version');
|
||||
serializer.storeString(navigator.language || 'en', 'system_lang_code');
|
||||
|
@ -21,6 +21,7 @@ export class NetworkerFactory {
|
||||
public updatesProcessor: (obj: any) => void = null;
|
||||
public onConnectionStatusChange: (info: ConnectionStatusChange) => void = null;
|
||||
public akStopped = false;
|
||||
public userAgent = navigator.userAgent;
|
||||
|
||||
public setUpdatesProcessor(callback: (obj: any) => void) {
|
||||
this.updatesProcessor = callback;
|
||||
|
Loading…
x
Reference in New Issue
Block a user