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

@ -48,7 +48,7 @@ import {
isMessageRequestResponse,
} from '../state/selectors/message';
import {
getContact,
getAuthor,
messageHasPaymentEvent,
getPaymentEventNotificationText,
} from '../messages/helpers';
@ -260,7 +260,7 @@ export function getNotificationDataForMessage(
if (isGroupUpdate(attributes)) {
const { group_update: groupUpdate } = attributes;
const fromContact = getContact(attributes);
const fromContact = getAuthor(attributes);
const messages = [];
if (!groupUpdate) {
throw new Error('getNotificationData: Missing group_update');
@ -499,7 +499,7 @@ export function getNotificationDataForMessage(
};
}
const fromContact = getContact(attributes);
const fromContact = getAuthor(attributes);
const sender = fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
return {
emoji,