From 19632746d4f27d5f373c1f076d5978f1223a5993 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 9 Dec 2024 19:28:20 +0100 Subject: [PATCH] respect mention setting for reactions and webxdc-notifications --- DcNotificationService/NotificationService.swift | 4 ++-- deltachat-ios/Helper/NotificationManager.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DcNotificationService/NotificationService.swift b/DcNotificationService/NotificationService.swift index 4a0d9fb8d..5e1c25370 100644 --- a/DcNotificationService/NotificationService.swift +++ b/DcNotificationService/NotificationService.swift @@ -61,7 +61,7 @@ class NotificationService: UNNotificationServiceExtension { if !dcContext.isMuted() { let msg = dcContext.getMessage(id: event.data2Int) let chat = dcContext.getChat(chatId: msg.chatId) - if !chat.isMuted { + if !chat.isMuted || dcContext.isMentionsEnabled() { let sender = dcContext.getContact(id: event.data1Int).displayName let summary = (msg.summary(chars: 80) ?? "") bestAttemptContent.title = chat.name @@ -76,7 +76,7 @@ class NotificationService: UNNotificationServiceExtension { } } else if event.id == DC_EVENT_INCOMING_WEBXDC_NOTIFY { let dcContext = dcAccounts.get(id: event.accountId) - if !dcContext.isMuted() { + if !dcContext.isMuted() || dcContext.isMentionsEnabled() { let msg = dcContext.getMessage(id: event.data2Int) let chat = dcContext.getChat(chatId: msg.chatId) if !chat.isMuted { diff --git a/deltachat-ios/Helper/NotificationManager.swift b/deltachat-ios/Helper/NotificationManager.swift index 3e0f3bb92..39bcfc6a0 100644 --- a/deltachat-ios/Helper/NotificationManager.swift +++ b/deltachat-ios/Helper/NotificationManager.swift @@ -136,7 +136,7 @@ public class NotificationManager { if !eventContext.isMuted() { let msg = eventContext.getMessage(id: ui["msg_id"] as? Int ?? 0) let chat = eventContext.getChat(chatId: msg.chatId) - if !chat.isMuted { + if !chat.isMuted || dcContext.isMentionsEnabled() { let contact = eventContext.getContact(id: ui["contact_id"] as? Int ?? 0) let summary = (msg.summary(chars: 80) ?? "") let reaction = ui["reaction"] as? String ?? "" @@ -168,7 +168,7 @@ public class NotificationManager { if !eventContext.isMuted() { let msg = eventContext.getMessage(id: ui["msg_id"] as? Int ?? 0) let chat = eventContext.getChat(chatId: msg.chatId) - if !chat.isMuted { + if !chat.isMuted || dcContext.isMentionsEnabled() { let content = UNMutableNotificationContent() content.title = chat.name content.body = msg.getWebxdcAppName() + ": " + (ui["text"] as? String ?? "")