Send edited messages support
Co-authored-by: Fedor Indutnyy <indutny@signal.org>
This commit is contained in:
parent
d380817a44
commit
1f2cde6d04
79 changed files with 2507 additions and 1175 deletions
|
@ -111,7 +111,7 @@ export function getPaymentEventDescription(
|
|||
export function isQuoteAMatch(
|
||||
message: MessageAttributesType | null | undefined,
|
||||
conversationId: string,
|
||||
quote: QuotedMessageType
|
||||
quote: Pick<QuotedMessageType, 'id' | 'authorUuid' | 'author'>
|
||||
): message is MessageAttributesType {
|
||||
if (!message) {
|
||||
return false;
|
||||
|
@ -124,8 +124,13 @@ export function isQuoteAMatch(
|
|||
reason: 'helpers.isQuoteAMatch',
|
||||
});
|
||||
|
||||
const isSameTimestamp =
|
||||
message.sent_at === id ||
|
||||
message.editHistory?.some(({ timestamp }) => timestamp === id) ||
|
||||
false;
|
||||
|
||||
return (
|
||||
message.sent_at === id &&
|
||||
isSameTimestamp &&
|
||||
message.conversationId === conversationId &&
|
||||
getContactId(message) === authorConversation?.id
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue