diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/SignerProvider.kt b/app/src/main/java/com/greenart7c3/nostrsigner/SignerProvider.kt index 8bcc7d71..6d5ea90a 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/SignerProvider.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/SignerProvider.kt @@ -127,14 +127,18 @@ class SignerProvider : ContentProvider() { ) if (permission == null) { event.kind.kindToNip()?.let { - permission = + val nipNumber = it.toIntOrNull() + permission = if (nipNumber == null) { + null + } else { database .applicationDao() .getPermission( sortOrder ?: packageName, "NIP", - it.toInt(), + nipNumber, ) + } } } val signPolicy = database.applicationDao().getSignPolicy(sortOrder ?: packageName) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt b/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt index c48adb6d..bd4313a6 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt @@ -65,7 +65,7 @@ class EventNotificationConsumer(private val applicationContext: Context) { } } - suspend fun consume(event: GiftWrapEvent) { + fun consume(event: GiftWrapEvent) { if (!notificationManager().areNotificationsEnabled()) return // PushNotification Wraps don't include a receiver. @@ -85,7 +85,7 @@ class EventNotificationConsumer(private val applicationContext: Context) { pushWrappedEvent: GiftWrapEvent, account: Account, ) { - pushWrappedEvent.cachedGift(account.signer) { notificationEvent -> + pushWrappedEvent.unwrap(account.signer) { notificationEvent -> unwrapAndConsume(notificationEvent, account) { innerEvent -> if (innerEvent.kind == 24133) { notify(innerEvent, account) @@ -101,10 +101,10 @@ class EventNotificationConsumer(private val applicationContext: Context) { ) { when (event) { is GiftWrapEvent -> { - event.cachedGift(account.signer) { unwrapAndConsume(it, account, onReady) } + event.unwrap(account.signer) { unwrapAndConsume(it, account, onReady) } } is SealedGossipEvent -> { - event.cachedGossip(account.signer) { + event.unseal(account.signer) { onReady(it) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8628b260..182966e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,8 +8,8 @@ core = "3.5.3" coreKtx = "1.13.1" coreSplashscreen = "1.0.1" espressoCore = "3.6.1" -firebaseBom = "33.1.2" -firebaseMessaging = "24.0.0" +firebaseBom = "33.2.0" +firebaseMessaging = "24.0.1" jna = "5.14.0" junit = "4.13.2" junitVersion = "1.2.1" @@ -17,7 +17,7 @@ lifecycle_version = "2.8.4" material3 = "1.2.1" mockk = "1.13.12" nav_version = "2.7.7" -quartz = "0.89.9" +quartz = "0.90.3" compose_ui = "1.6.8" richtextUi = "077a2cde64" roomKtx = "2.6.1"