Skip to content

Commit

Permalink
fix sender
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Oct 20, 2024
1 parent aa2348b commit fd1c7a8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions DcNotificationService/NotificationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd1c7a8

Please sign in to comment.