This commit is contained in:
Ryan Zhao 2021-07-29 10:46:00 +10:00
parent 9dd6f35f77
commit ad351d8009
6 changed files with 3 additions and 14 deletions

View File

@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "ic_notification_mentions.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_notification_mentions-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_notification_mentions-2.png",
"idiom" : "universal",
"scale" : "3x"
"filename" : "ic_notifications_mentions.pdf",
"idiom" : "universal"
}
],
"info" : {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -61,7 +61,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
if let thread = TSThread.fetch(uniqueId: threadID, transaction: transaction), let group = thread as? TSGroupThread,
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 let messageBody = tsIncomingMessage.previewText(with: transaction).filterForDisplay, !messageBody.contains("@\(userPublicKey)") && group.isOnlyNotifyMentions {
if let messageBody = tsIncomingMessage.previewText(with: transaction).filterForDisplay, !messageBody.contains("@\(userPublicKey)") && group.isOnlyNotifyingForMentions {
// Ignore PNs if the group is set to only notify mentions
return self.completeSilenty()
}