From eb29b5d64142f1d29eebe2a185c5b4801bfbd5c0 Mon Sep 17 00:00:00 2001
From: Niels Andriesse <andriesseniels@gmail.com>
Date: Tue, 3 Aug 2021 15:46:34 +1000
Subject: [PATCH] Minor cleanup

---
 .../NotificationServiceExtension.swift                       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/SessionNotificationServiceExtension/NotificationServiceExtension.swift b/SessionNotificationServiceExtension/NotificationServiceExtension.swift
index 9565a7be4..983fdb7ce 100644
--- a/SessionNotificationServiceExtension/NotificationServiceExtension.swift
+++ b/SessionNotificationServiceExtension/NotificationServiceExtension.swift
@@ -38,7 +38,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
                     let (message, proto) = try MessageReceiver.parse(envelopeAsData, openGroupMessageServerID: nil, using: transaction)
                     let senderPublicKey = message.sender!
                     if (senderPublicKey == userPublicKey) {
-                        // Ignore PNs of messages sent from current user.
+                        // Ignore PNs for messages sent by the current user
                         return self.completeSilenty()
                     }
                     var senderDisplayName = Storage.shared.getContact(with: senderPublicKey)?.displayName(for: .regular) ?? senderPublicKey
@@ -52,6 +52,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
                         }
                         let thread = tsIncomingMessage.thread(with: transaction)
                         if thread.isMuted {
+                            // Ignore PNs if the thread is muted
                             return self.completeSilenty()
                         }
                         let threadID = thread.uniqueId!
@@ -62,7 +63,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
                             group.groupModel.groupType == .closedGroup { // Should always be true because we don't get PNs for open groups
                             senderDisplayName = String(format: NotificationStrings.incomingGroupMessageTitleFormat, senderDisplayName, group.groupModel.groupName ?? MessageStrings.newGroupDefaultTitle)
                             if group.isOnlyNotifyingForMentions && !tsIncomingMessage.isUserMentioned {
-                                // Ignore PNs if the group is set to only notify mentions
+                                // Ignore PNs if the group is set to only notify for mentions
                                 return self.completeSilenty()
                             }
                         }