Do not confirm DOE or edit until it is processed

This commit is contained in:
Josh Perez 2023-08-07 12:36:37 -04:00 committed by GitHub
parent 7b6cd00b3f
commit d8ea785f4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 145 additions and 138 deletions

View file

@ -21,7 +21,7 @@ import type {
} from '../model-types.d';
import { filter, find, map, repeat, zipObject } from '../util/iterables';
import * as GoogleChrome from '../util/GoogleChrome';
import type { DeleteModel } from '../messageModifiers/Deletes';
import type { DeleteAttributesType } from '../messageModifiers/Deletes';
import type { SentEventData } from '../textsecure/messageReceiverEvents';
import { isNotNil } from '../util/isNotNil';
import { isNormalNumber } from '../util/isNormalNumber';
@ -3230,7 +3230,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}
async handleDeleteForEveryone(
del: DeleteModel,
del: Pick<
DeleteAttributesType,
'fromId' | 'targetSentTimestamp' | 'serverTimestamp'
>,
shouldPersist = true
): Promise<void> {
if (this.deletingForEveryone || this.get('deletedForEveryone')) {
@ -3239,10 +3242,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
log.info('Handling DOE.', {
messageId: this.id,
fromId: del.get('fromId'),
targetSentTimestamp: del.get('targetSentTimestamp'),
fromId: del.fromId,
targetSentTimestamp: del.targetSentTimestamp,
messageServerTimestamp: this.get('serverTimestamp'),
deleteServerTimestamp: del.get('serverTimestamp'),
deleteServerTimestamp: del.serverTimestamp,
});
try {