Fix out-of-order applications of reaction and delete-for-everyone
This commit is contained in:
parent
05f905fd10
commit
e8759fc81b
3 changed files with 14 additions and 12 deletions
|
@ -24,15 +24,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
const senderId = message.getContactId();
|
||||
const sentAt = message.get('sent_at');
|
||||
const reactionsBySource = this.filter(re => {
|
||||
const mcid = message.get('conversationId');
|
||||
const recid = ConversationController.ensureContactIds({
|
||||
const targetSenderId = ConversationController.ensureContactIds({
|
||||
e164: re.get('targetAuthorE164'),
|
||||
uuid: re.get('targetAuthorUuid'),
|
||||
});
|
||||
const mTime = message.get('sent_at');
|
||||
const rTime = re.get('targetTimestamp');
|
||||
return mcid === recid && mTime === rTime;
|
||||
const targetTimestamp = re.get('targetTimestamp');
|
||||
return targetSenderId === senderId && targetTimestamp === sentAt;
|
||||
});
|
||||
|
||||
if (reactionsBySource.length > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue