"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ts/util/deleteForEveryone.ts" 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).

deleteForEveryone.ts  (Signal-Desktop-1.35.2):deleteForEveryone.ts  (Signal-Desktop-1.36.1)
skipping to change at line 13 skipping to change at line 13
const ONE_DAY = 24 * 60 * 60 * 1000; const ONE_DAY = 24 * 60 * 60 * 1000;
export async function deleteForEveryone( export async function deleteForEveryone(
message: MessageModelType, message: MessageModelType,
doe: DeletesModelType, doe: DeletesModelType,
shouldPersist: boolean = true shouldPersist: boolean = true
): Promise<void> { ): Promise<void> {
// Make sure the server timestamps for the DOE and the matching message // Make sure the server timestamps for the DOE and the matching message
// are less than one day apart // are less than one day apart
const delta = Math.abs( const delta = Math.abs(
doe.get('serverTimestamp') - message.get('serverTimestamp') doe.get('serverTimestamp') - (message.get('serverTimestamp') || 0)
); );
if (delta > ONE_DAY) { if (delta > ONE_DAY) {
window.log.info('Received late DOE. Dropping.', { window.log.info('Received late DOE. Dropping.', {
fromId: doe.get('fromId'), fromId: doe.get('fromId'),
targetSentTimestamp: doe.get('targetSentTimestamp'), targetSentTimestamp: doe.get('targetSentTimestamp'),
messageServerTimestamp: message.get('serverTimestamp'), messageServerTimestamp: message.get('serverTimestamp'),
deleteServerTimestamp: doe.get('serverTimestamp'), deleteServerTimestamp: doe.get('serverTimestamp'),
}); });
return; return;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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