feat: include release channel in release version request

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

@ -9,6 +9,8 @@ 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'; import { getOSArchitecture } from '../../../OS';
import type { ReleaseChannels } from '../../../updater/types';
import { Storage } from '../../../util/storage';
export const fileServerHost = 'filev2.getsession.org'; export const fileServerHost = 'filev2.getsession.org';
export const fileServerURL = `http://${fileServerHost}`; export const fileServerURL = `http://${fileServerHost}`;
@ -148,7 +150,8 @@ export const getLatestReleaseFromFileServer = async (
'X-FS-Signature': fromUInt8ArrayToBase64(signature), 'X-FS-Signature': fromUInt8ArrayToBase64(signature),
}; };
const endpoint = `${RELEASE_VERSION_ENDPOINT}&arch=${getOSArchitecture()}`; const releaseChannel = Storage.get('releaseChannel') as ReleaseChannels;
const endpoint = `${RELEASE_VERSION_ENDPOINT}&arch=${getOSArchitecture()}${releaseChannel ? `&releases=${releaseChannel}` : ''}`;
const result = await OnionSending.sendJsonViaOnionV4ToFileServer({ const result = await OnionSending.sendJsonViaOnionV4ToFileServer({
abortSignal: new AbortController().signal, abortSignal: new AbortController().signal,
endpoint, endpoint,

Loading…
Cancel
Save