feat: include architecture in release version request

pull/3281/head
yougotwill 3 months ago
parent 19d479bae9
commit 72d5175e6f

@ -13,3 +13,5 @@ export const isWindows = (minVersion?: string) => {
return _.isUndefined(minVersion) ? true : semver.gte(osRelease, minVersion); return _.isUndefined(minVersion) ? true : semver.gte(osRelease, minVersion);
}; };
export const getOSArchitecture = () => os.arch();

@ -8,6 +8,7 @@ import {
import { fromUInt8ArrayToBase64 } from '../../utils/String'; import { fromUInt8ArrayToBase64 } from '../../utils/String';
import { NetworkTime } from '../../../util/NetworkTime'; import { NetworkTime } from '../../../util/NetworkTime';
import { DURATION } from '../../constants'; import { DURATION } from '../../constants';
import { getOSArchitecture } from '../../../OS';
export const fileServerHost = 'filev2.getsession.org'; export const fileServerHost = 'filev2.getsession.org';
export const fileServerURL = `http://${fileServerHost}`; export const fileServerURL = `http://${fileServerHost}`;
@ -146,9 +147,11 @@ export const getLatestReleaseFromFileServer = async (
'X-FS-Timestamp': `${sigTimestampSeconds}`, 'X-FS-Timestamp': `${sigTimestampSeconds}`,
'X-FS-Signature': fromUInt8ArrayToBase64(signature), 'X-FS-Signature': fromUInt8ArrayToBase64(signature),
}; };
const endpoint = `${RELEASE_VERSION_ENDPOINT}&arch=${getOSArchitecture()}`;
const result = await OnionSending.sendJsonViaOnionV4ToFileServer({ const result = await OnionSending.sendJsonViaOnionV4ToFileServer({
abortSignal: new AbortController().signal, abortSignal: new AbortController().signal,
endpoint: RELEASE_VERSION_ENDPOINT, endpoint,
method: 'GET', method: 'GET',
stringifiedBody: null, stringifiedBody: null,
headers, headers,

Loading…
Cancel
Save