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

@ -14,8 +14,10 @@ import { getContact } from '../messages/helpers';
import { getQuoteBodyText } from './getQuoteBodyText';
import { isGIF } from '../types/Attachment';
import { isGiftBadge, isTapToView } from '../state/selectors/message';
import * as log from '../logging/log';
import { map, take, collect } from './iterables';
import { strictAssert } from './assert';
import { getMessageSentTimestamp } from './getMessageSentTimestamp';
export async function makeQuote(
quotedMessage: MessageAttributesType
@ -27,14 +29,13 @@ export async function makeQuote(
const {
attachments,
bodyRanges,
editMessageTimestamp,
id: messageId,
payment,
preview,
sticker,
} = quotedMessage;
const quoteId = editMessageTimestamp || quotedMessage.sent_at;
const quoteId = getMessageSentTimestamp(quotedMessage, { log });
return {
authorUuid: contact.get('uuid'),