Debug PN extension

This commit is contained in:
Niels Andriesse 2020-12-03 17:26:29 +11:00
parent bcd0d5ba94
commit 75f7a7973b
3 changed files with 3 additions and 4 deletions

View File

@ -32,7 +32,6 @@ target 'SessionShareExtension' do
end
target 'SessionNotificationServiceExtension' do
pod 'CryptoSwift', :inhibit_warnings => true
pod 'Curve25519Kit', git: 'https://github.com/signalapp/Curve25519Kit.git', :inhibit_warnings => true
pod 'SignalCoreKit', git: 'https://github.com/signalapp/SignalCoreKit.git', :inhibit_warnings => true
pod 'YapDatabase/SQLCipher', :git => 'https://github.com/loki-project/session-ios-yap-database.git', branch: 'signal-release', :inhibit_warnings => true

View File

@ -230,6 +230,6 @@ SPEC CHECKSUMS:
YYImage: 6db68da66f20d9f169ceb94dfb9947c3867b9665
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
PODFILE CHECKSUM: 78c69e4efd6f98e563a7da1481741827fb18e21e
PODFILE CHECKSUM: 7699c2a380fc803ef7f51157f1f75da756aa3b45
COCOAPODS: 1.10.0.rc.1

View File

@ -45,9 +45,9 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
return self.handleFailure(for: notificationContent)
}
let snippet = tsIncomingMessage.previewText(with: transaction).filterForDisplay
let userInfo: [String:Any] = [ NotificationServiceExtension.threadIdKey : tsIncomingMessage.thread.uniqueId!, NotificationServiceExtension.isFromRemoteKey : true ]
let userInfo: [String:Any] = [ NotificationServiceExtension.threadIdKey : tsIncomingMessage.thread(with: transaction).uniqueId!, NotificationServiceExtension.isFromRemoteKey : true ]
let senderPublicKey = message.sender!
let senderDisplayName = OWSProfileManager.shared().profileNameForRecipient(withID: senderPublicKey, avoidWriteTransaction: true) ?? senderPublicKey
let senderDisplayName = OWSProfileManager.shared().profileNameForRecipient(withID: senderPublicKey, transaction: transaction) ?? senderPublicKey
notificationContent.userInfo = userInfo
notificationContent.badge = 1
let notificationsPreference = Environment.shared.preferences!.notificationPreviewType()