Sync read receipt configuration upon relink
Fixes https://github.com/signalapp/Signal-Android/issues/7535.
This commit is contained in:
parent
ce8fe0d345
commit
bcbd526b99
1 changed files with 12 additions and 16 deletions
|
@ -294,7 +294,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var connectCount = 0;
|
var connectCount = 0;
|
||||||
function connect(firstRun) {
|
async function connect(firstRun) {
|
||||||
console.log('connect');
|
console.log('connect');
|
||||||
|
|
||||||
// Bootstrap our online/offline detection, only the first time we connect
|
// Bootstrap our online/offline detection, only the first time we connect
|
||||||
|
@ -359,22 +359,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we've just upgraded to read receipt support on desktop, kick off a
|
/* eslint-enable */
|
||||||
// one-time configuration sync request to get the read-receipt setting
|
const deviceId = textsecure.storage.user.getDeviceId();
|
||||||
// from the master device.
|
const { sendRequestConfigurationSyncMessage } = textsecure.messaging;
|
||||||
var readReceiptConfigurationSync = 'read-receipt-configuration-sync';
|
const status = await Signal.Startup.syncReadReceiptConfiguration({
|
||||||
if (!storage.get(readReceiptConfigurationSync)) {
|
deviceId,
|
||||||
|
sendRequestConfigurationSyncMessage,
|
||||||
|
storage,
|
||||||
|
});
|
||||||
|
console.log('Sync read receipt configuration status:', status);
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
if (!firstRun && textsecure.storage.user.getDeviceId() != '1') {
|
if (firstRun === true && deviceId != '1') {
|
||||||
textsecure.messaging.sendRequestConfigurationSyncMessage().then(function() {
|
|
||||||
storage.put(readReceiptConfigurationSync, true);
|
|
||||||
}).catch(function(e) {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (firstRun === true && textsecure.storage.user.getDeviceId() != '1') {
|
|
||||||
if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') {
|
if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') {
|
||||||
storage.put('theme-setting', 'ios');
|
storage.put('theme-setting', 'ios');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue