Skip to content

Commit

Permalink
Request configuration sync on startup of new version
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Nov 28, 2018
1 parent f5954db commit 313d083
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 243 deletions.
13 changes: 0 additions & 13 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,19 +698,6 @@
}

const deviceId = textsecure.storage.user.getDeviceId();
const ourNumber = textsecure.storage.user.getNumber();
const { sendRequestConfigurationSyncMessage } = textsecure.messaging;
const status = await Signal.Startup.syncReadReceiptConfiguration({
ourNumber,
deviceId,
sendRequestConfigurationSyncMessage,
storage,
prepareForSend: ConversationController.prepareForSend.bind(
ConversationController
),
});
window.log.info('Sync configuration status:', status);

if (firstRun === true && deviceId !== '1') {
const hasThemeSetting = Boolean(storage.get('theme-setting'));
if (!hasThemeSetting && textsecure.storage.get('userAgent') === 'OWI') {
Expand Down
2 changes: 0 additions & 2 deletions js/modules/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const IndexedDB = require('./indexeddb');
const Notifications = require('../../ts/notifications');
const OS = require('../../ts/OS');
const Settings = require('./settings');
const Startup = require('./startup');
const Util = require('../../ts/util');
const { migrateToSQL } = require('./migrate_to_sql');
const Metadata = require('./metadata/SecretSessionCipher');
Expand Down Expand Up @@ -233,7 +232,6 @@ exports.setup = (options = {}) => {
OS,
RefreshSenderCertificate,
Settings,
Startup,
Types,
Util,
Views,
Expand Down
65 changes: 0 additions & 65 deletions js/modules/startup.js

This file was deleted.

6 changes: 5 additions & 1 deletion libtextsecure/sync_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
ourNumber,
{ syncMessage: true }
);
window.log.info('SyncRequest created. Sending contact sync message...');

window.log.info('SyncRequest created. Sending config sync request...');
wrap(sender.sendRequestConfigurationSyncMessage(sendOptions));

window.log.info('SyncRequest now sending contact sync message...');
wrap(sender.sendRequestContactSyncMessage(sendOptions))
.then(() => {
window.log.info('SyncRequest now sending group sync messsage...');
Expand Down
150 changes: 0 additions & 150 deletions test/modules/startup_test.js

This file was deleted.

24 changes: 12 additions & 12 deletions ts/util/lint/exceptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@
"rule": "jQuery-wrap(",
"path": "js/background.js",
"line": " wrap(",
"lineNumber": 740,
"lineNumber": 727,
"reasonCategory": "falseMatch",
"updated": "2018-10-18T22:23:00.485Z"
},
{
"rule": "jQuery-wrap(",
"path": "js/background.js",
"line": " await wrap(",
"lineNumber": 1270,
"lineNumber": 1257,
"reasonCategory": "falseMatch",
"updated": "2018-10-26T22:43:23.229Z"
},
Expand Down Expand Up @@ -379,14 +379,6 @@
"reasonCategory": "falseMatch",
"updated": "2018-09-19T18:13:29.628Z"
},
{
"rule": "jQuery-wrap(",
"path": "js/modules/startup.js",
"line": " await wrap(sendRequestConfigurationSyncMessage(sendOptions));",
"lineNumber": 52,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
{
"rule": "jQuery-$(",
"path": "js/permissions_popup_start.js",
Expand Down Expand Up @@ -2372,19 +2364,27 @@
"reasonCategory": "falseMatch",
"updated": "2018-09-19T18:13:29.628Z"
},
{
"rule": "jQuery-wrap(",
"path": "libtextsecure/sync_request.js",
"line": " wrap(sender.sendRequestConfigurationSyncMessage(sendOptions));",
"lineNumber": 33,
"reasonCategory": "falseMatch",
"updated": "2018-11-28T19:48:16.607Z"
},
{
"rule": "jQuery-wrap(",
"path": "libtextsecure/sync_request.js",
"line": " wrap(sender.sendRequestContactSyncMessage(sendOptions))",
"lineNumber": 32,
"lineNumber": 36,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
{
"rule": "jQuery-wrap(",
"path": "libtextsecure/sync_request.js",
"line": " return wrap(sender.sendRequestGroupSyncMessage(sendOptions));",
"lineNumber": 35,
"lineNumber": 39,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
Expand Down

0 comments on commit 313d083

Please sign in to comment.