chore: confirm before delete contact (#35)

Reviewed-on: #35
This commit was merged in pull request #35.
This commit is contained in:
2026-07-03 09:09:56 +00:00
parent 8b2f0faa59
commit 19daea119d
2 changed files with 80 additions and 37 deletions

View File

@@ -52,7 +52,7 @@ class MessageManager(private val nostr: Nostr) {
try {
val author =
signer.getPublicKeyAsync() ?: throw IllegalStateException("User not signed in")
val relays = nip17ExtractRelayList(msgRelayList)
// Ensure relay connections
@@ -130,7 +130,7 @@ class MessageManager(private val nostr: Nostr) {
val filter = Filter().identifier(giftId.toHex())
val event = client?.database()?.query(filter)?.first()
return event?.content()?.let { UnsignedEvent.fromJson(it) }
return event?.content()?.let { UnsignedEvent.fromJson(it).ensureId() }
} catch (e: Throwable) {
throw IllegalStateException("Failed to get cached rumor: ${e.message}", e)
}