chore: update nostr sdk

This commit is contained in:
2026-06-08 16:40:56 +07:00
parent 50b7f7a3f3
commit 6a69d3a5b2
7 changed files with 44 additions and 52 deletions

View File

@@ -52,13 +52,17 @@ class NostrForegroundService : Service() {
notificationJob = serviceScope.launch {
try {
Log.d("Coop", "Starting Nostr in background")
// Create a database directory
val dbDir = File(filesDir, "nostr")
dbDir.mkdirs()
// Initialize Nostr client
nostr.init(dbDir.absolutePath)
try {
nostr.init(dbDir.absolutePath)
} catch (e: Exception) {
throw IllegalStateException("Failed to initialize Nostr Client", e)
}
// Connect to bootstrap relays
nostr.connectBootstrapRelays()
// Handle notifications