addMessageRequestResponseMessage: Don't update active_at on initial sync
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
1dbf1ce0a9
commit
df8ee8b13d
2 changed files with 5 additions and 1 deletions
|
@ -188,6 +188,7 @@ import { explodePromise } from '../util/explodePromise';
|
||||||
import { getCallHistorySelector } from '../state/selectors/callHistory';
|
import { getCallHistorySelector } from '../state/selectors/callHistory';
|
||||||
import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus';
|
import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus';
|
||||||
import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes';
|
import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes';
|
||||||
|
import { getIsInitialSync } from '../services/contactSync';
|
||||||
|
|
||||||
/* eslint-disable more/no-then */
|
/* eslint-disable more/no-then */
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
@ -2344,7 +2345,7 @@ export class ConversationModel extends window.Backbone
|
||||||
ourAci: window.textsecure.storage.user.getCheckedAci(),
|
ourAci: window.textsecure.storage.user.getCheckedAci(),
|
||||||
forceSave: true,
|
forceSave: true,
|
||||||
});
|
});
|
||||||
if (!this.get('active_at')) {
|
if (!getIsInitialSync() && !this.get('active_at')) {
|
||||||
this.set({ active_at: Date.now() });
|
this.set({ active_at: Date.now() });
|
||||||
await DataWriter.updateConversation(this.attributes);
|
await DataWriter.updateConversation(this.attributes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@ export function setIsInitialSync(newValue: boolean): void {
|
||||||
log.info(`setIsInitialSync(${newValue})`);
|
log.info(`setIsInitialSync(${newValue})`);
|
||||||
isInitialSync = newValue;
|
isInitialSync = newValue;
|
||||||
}
|
}
|
||||||
|
export function getIsInitialSync(): boolean {
|
||||||
|
return isInitialSync;
|
||||||
|
}
|
||||||
|
|
||||||
async function updateConversationFromContactSync(
|
async function updateConversationFromContactSync(
|
||||||
conversation: ConversationModel,
|
conversation: ConversationModel,
|
||||||
|
|
Loading…
Reference in a new issue