Fix notification text for incoming pinned message

This commit is contained in:
Jamie
2025-12-17 07:23:14 -08:00
committed by GitHub
parent 1f4522cd7d
commit c9457f31db

View File

@@ -512,14 +512,14 @@ export function getNotificationDataForMessage(
}
if (isPinnedMessageNotification(attributes)) {
const fromContact = getAuthor(attributes);
const { sourceServiceId } = attributes;
const ourAci = itemStorage.user.getCheckedAci();
let text: string;
if (fromContact?.getAci() === ourAci) {
if (sourceServiceId === ourAci) {
text = i18n('icu:message--pinned--preview--sent');
} else {
const sender = fromContact?.getTitle() ?? i18n('icu:unknownContact');
const sender = findAndFormatContact(sourceServiceId).title;
text = i18n('icu:message--pinned--preview--received', { sender });
}