Improve message targeting for incoming reactions

This commit is contained in:
trevor-signal 2024-04-29 17:20:20 -04:00 committed by GitHub
parent f02a11bc9b
commit a0b4126b52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 769 additions and 180 deletions

View file

@ -244,7 +244,7 @@ export type GetContactOptions = Pick<
'conversationSelector' | 'ourConversationId' | 'ourNumber' | 'ourAci'
>;
export function getContactId(
export function getAuthorId(
message: MessageWithUIFieldsType,
{
conversationSelector,
@ -704,7 +704,7 @@ export const getPropsForMessage = (
(message.reactions || []).find(re => re.fromId === ourConversationId) || {}
).emoji;
const authorId = getContactId(message, {
const authorId = getAuthorId(message, {
conversationSelector,
ourConversationId,
ourNumber,
@ -2096,7 +2096,7 @@ export const getMessageDetails = createSelector(
let conversationIds: Array<string>;
if (isIncoming(message)) {
conversationIds = [
getContactId(message, {
getAuthorId(message, {
conversationSelector,
ourConversationId,
ourNumber,