Improve message targeting for incoming reactions
This commit is contained in:
parent
f02a11bc9b
commit
a0b4126b52
19 changed files with 769 additions and 180 deletions
|
@ -17,7 +17,7 @@ import type { ConversationModel } from './models/conversations';
|
|||
import dataInterface from './sql/Client';
|
||||
import * as log from './logging/log';
|
||||
import * as Errors from './types/errors';
|
||||
import { getContactId } from './messages/helpers';
|
||||
import { getAuthorId } from './messages/helpers';
|
||||
import { maybeDeriveGroupV2Id } from './groups';
|
||||
import { assertDev, strictAssert } from './util/assert';
|
||||
import { drop } from './util/drop';
|
||||
|
@ -1236,7 +1236,7 @@ export class ConversationController {
|
|||
targetTimestamp: number
|
||||
): Promise<ConversationModel | null | undefined> {
|
||||
const messages = await getMessagesBySentAt(targetTimestamp);
|
||||
const targetMessage = messages.find(m => getContactId(m) === targetFromId);
|
||||
const targetMessage = messages.find(m => getAuthorId(m) === targetFromId);
|
||||
|
||||
if (targetMessage) {
|
||||
return this.get(targetMessage.conversationId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue