From fd1c7a8d7d3f6aac8a4a2cf677c6ccc2525ffa4e Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 20 Oct 2024 13:01:32 +0200 Subject: [PATCH] fix sender --- DcNotificationService/NotificationService.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/DcNotificationService/NotificationService.swift b/DcNotificationService/NotificationService.swift index 4f90fc95f..76065bf06 100644 --- a/DcNotificationService/NotificationService.swift +++ b/DcNotificationService/NotificationService.swift @@ -61,13 +61,9 @@ class NotificationService: UNNotificationServiceExtension { let msg = dcContext.getMessage(id: event.data2Int) let chat = dcContext.getChat(chatId: msg.chatId) if !chat.isMuted { - let sender = msg.getSenderName(dcContext.getContact(id: msg.fromContactId)) + let sender = msg.getSenderName(dcContext.getContact(id: event.data1Int)) let summary = (msg.summary(chars: 80) ?? "") - if chat.isGroup { - bestAttemptContent.title = chat.name - } else { - bestAttemptContent.title = sender - } + bestAttemptContent.title = chat.name bestAttemptContent.body = String.localized(stringID: "reaction_by_other", parameter: sender, event.data2String, summary) bestAttemptContent.userInfo["account_id"] = dcContext.id bestAttemptContent.userInfo["chat_id"] = chat.id