Let it throw in the giftwrap parser to make sure Notifications work

This commit is contained in:
Vitor Pamplona
2024-11-01 18:40:34 -04:00
parent 0884318a55
commit 635ad30de9

View File

@@ -77,13 +77,7 @@ class GiftWrapEvent(
onReady: (Event) -> Unit,
) {
plainContent(signer) { giftStr ->
val gift =
try {
fromJson(giftStr)
} catch (e: Exception) {
Log.w("GiftWrapEvent", "Couldn't Parse the content " + this.toNostrUri() + " " + giftStr)
return@plainContent
}
val gift = fromJson(giftStr)
if (gift is WrappedEvent) {
gift.host = HostStub(this.id, this.pubKey, this.kind)