Fix send state "updated at" timestamp for receipts

This commit is contained in:
Evan Hahn 2021-11-04 15:49:38 -05:00 committed by GitHub
parent b7682d2c79
commit 1c52c106b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -141,6 +141,7 @@ export class MessageReceipts extends Collection<MessageReceiptModel> {
async onReceipt(receipt: MessageReceiptModel): Promise<void> {
const type = receipt.get('type');
const messageSentAt = receipt.get('messageSentAt');
const receiptTimestamp = receipt.get('receiptTimestamp');
const sourceConversationId = receipt.get('sourceConversationId');
const sourceUuid = receipt.get('sourceUuid');
@ -191,7 +192,7 @@ export class MessageReceipts extends Collection<MessageReceiptModel> {
const newSendState = sendStateReducer(oldSendState, {
type: sendActionType,
updatedAt: messageSentAt,
updatedAt: receiptTimestamp,
});
// The send state may not change. For example, this can happen if we get a read