"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "preload.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

preload.js  (Signal-Desktop-1.35.2):preload.js  (Signal-Desktop-1.36.1)
skipping to change at line 22 skipping to change at line 22
const { remote } = electron; const { remote } = electron;
const { app } = remote; const { app } = remote;
const { nativeTheme } = remote.require('electron'); const { nativeTheme } = remote.require('electron');
// Enable calling // Enable calling
window.CALLING = true; window.CALLING = true;
window.PROTO_ROOT = 'protos'; window.PROTO_ROOT = 'protos';
const config = require('url').parse(window.location.toString(), true).query; const config = require('url').parse(window.location.toString(), true).query;
window.GV2 = false;
let title = config.name; let title = config.name;
if (config.environment !== 'production') { if (config.environment !== 'production') {
title += ` - ${config.environment}`; title += ` - ${config.environment}`;
} }
if (config.appInstance) { if (config.appInstance) {
title += ` - ${config.appInstance}`; title += ` - ${config.appInstance}`;
} }
window.platform = process.platform; window.platform = process.platform;
window.getTitle = () => title; window.getTitle = () => title;
window.getEnvironment = () => config.environment; window.getEnvironment = () => config.environment;
window.getAppInstance = () => config.appInstance; window.getAppInstance = () => config.appInstance;
window.getVersion = () => config.version; window.getVersion = () => config.version;
window.getExpiration = () => config.buildExpiration; window.getExpiration = () => {
const remoteBuildExpiration = window.storage.get('remoteBuildExpiration');
if (remoteBuildExpiration) {
return remoteBuildExpiration < config.buildExpiration
? remoteBuildExpiration
: config.buildExpiration;
}
return config.buildExpiration;
};
window.getNodeVersion = () => config.node_version; window.getNodeVersion = () => config.node_version;
window.getHostName = () => config.hostname; window.getHostName = () => config.hostname;
window.getServerTrustRoot = () => config.serverTrustRoot; window.getServerTrustRoot = () => config.serverTrustRoot;
window.getServerPublicParams = () => config.serverPublicParams; window.getServerPublicParams = () => config.serverPublicParams;
window.isBehindProxy = () => Boolean(config.proxyUrl); window.isBehindProxy = () => Boolean(config.proxyUrl);
function setSystemTheme() { function setSystemTheme() {
window.systemTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light'; window.systemTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
} }
skipping to change at line 333 skipping to change at line 343
window.log.info('Using provided proxy url'); window.log.info('Using provided proxy url');
} }
window.nodeSetImmediate = setImmediate; window.nodeSetImmediate = setImmediate;
window.textsecure = require('./ts/textsecure').default; window.textsecure = require('./ts/textsecure').default;
window.WebAPI = window.textsecure.WebAPI.initialize({ window.WebAPI = window.textsecure.WebAPI.initialize({
url: config.serverUrl, url: config.serverUrl,
storageUrl: config.storageUrl, storageUrl: config.storageUrl,
directoryUrl: config.directoryUrl,
directoryEnclaveId: config.directoryEnclaveId,
directoryTrustAnchor: config.directoryTrustAnchor,
cdnUrlObject: { cdnUrlObject: {
'0': config.cdnUrl0, '0': config.cdnUrl0,
'2': config.cdnUrl2, '2': config.cdnUrl2,
}, },
certificateAuthority: config.certificateAuthority, certificateAuthority: config.certificateAuthority,
contentProxyUrl: config.contentProxyUrl, contentProxyUrl: config.contentProxyUrl,
proxyUrl: config.proxyUrl, proxyUrl: config.proxyUrl,
version: config.version, version: config.version,
}); });
skipping to change at line 375 skipping to change at line 388
// https://stackoverflow.com/a/23299989 // https://stackoverflow.com/a/23299989
window.isValidE164 = maybeE164 => /^\+?[1-9]\d{1,14}$/.test(maybeE164); window.isValidE164 = maybeE164 => /^\+?[1-9]\d{1,14}$/.test(maybeE164);
window.normalizeUuids = (obj, paths, context) => { window.normalizeUuids = (obj, paths, context) => {
if (!obj) { if (!obj) {
return; return;
} }
paths.forEach(path => { paths.forEach(path => {
const val = _.get(obj, path); const val = _.get(obj, path);
if (val) { if (val) {
if (!window.isValidGuid(val)) { if (!val || !window.isValidGuid(val)) {
window.log.warn( window.log.warn(
`Normalizing invalid uuid: ${val} at path ${path} in context "${cont ext}"` `Normalizing invalid uuid: ${val} at path ${path} in context "${cont ext}"`
); );
} }
_.set(obj, path, val.toLowerCase()); if (val && val.toLowerCase) {
_.set(obj, path, val.toLowerCase());
}
} }
}); });
}; };
window.React = require('react'); window.React = require('react');
window.ReactDOM = require('react-dom'); window.ReactDOM = require('react-dom');
window.moment = require('moment'); window.moment = require('moment');
window.PQueue = require('p-queue').default; window.PQueue = require('p-queue').default;
const Signal = require('./js/modules/signal'); const Signal = require('./js/modules/signal');
 End of changes. 5 change blocks. 
3 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)