Improve message targeting for incoming reactions
This commit is contained in:
parent
f02a11bc9b
commit
a0b4126b52
19 changed files with 769 additions and 180 deletions
|
@ -70,7 +70,7 @@ import { shouldShowInvalidMessageToast } from '../../util/shouldShowInvalidMessa
|
|||
import { writeDraftAttachment } from '../../util/writeDraftAttachment';
|
||||
import { __DEPRECATED$getMessageById } from '../../messages/getMessageById';
|
||||
import { canReply, isNormalBubble } from '../selectors/message';
|
||||
import { getContactId } from '../../messages/helpers';
|
||||
import { getAuthorId } from '../../messages/helpers';
|
||||
import { getConversationSelector } from '../selectors/conversations';
|
||||
import { enqueueReactionForSend } from '../../reactions/enqueueReactionForSend';
|
||||
import { useBoundActions } from '../../hooks/useBoundActions';
|
||||
|
@ -341,7 +341,7 @@ function scrollToQuotedMessage({
|
|||
Boolean(
|
||||
item.conversationId === conversationId &&
|
||||
authorId &&
|
||||
getContactId(item) === authorId
|
||||
getAuthorId(item) === authorId
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue