mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Fix notification text for incoming pinned message
Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user