Use correct timestamp for receipts of edited messages

This commit is contained in:
Fedor Indutny 2023-05-16 10:37:12 -07:00 committed by GitHub
parent 8fe0047822
commit 5869717cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 156 additions and 52 deletions

View file

@ -24,6 +24,7 @@ import dataInterface from '../sql/Client';
import * as log from '../logging/log';
import { getSourceUuid } from '../messages/helpers';
import { queueUpdateMessage } from '../util/messageBatcher';
import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp';
const { deleteSentProtoRecipient } = dataInterface;
@ -159,7 +160,7 @@ export class MessageReceipts extends Collection<MessageReceiptModel> {
return [];
}
const sentAt = message.get('sent_at');
const sentAt = getMessageSentTimestamp(message.attributes, { log });
const receipts = this.filter(
receipt => receipt.get('messageSentAt') === sentAt
);