mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
enable only notify mention for closed groups
This commit is contained in:
parent
369034d790
commit
12a995bc91
3 changed files with 4 additions and 2 deletions
|
@ -515,7 +515,7 @@ CGFloat kIconViewLength = 24;
|
|||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}]];
|
||||
|
||||
if (self.isOpenGroup) {
|
||||
if (self.isGroupThread) {
|
||||
// Notification Settings
|
||||
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{
|
||||
UITableViewCell *cell = [OWSTableItem newCell];
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.usernotifications.filtering</key>
|
||||
<true/>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
|
|
|
@ -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.isOnlyNotifyingForMentions {
|
||||
if group.isOnlyNotifyingForMentions && !tsIncomingMessage.isUserMentioned {
|
||||
// Ignore PNs if the group is set to only notify mentions
|
||||
return self.completeSilenty()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue