Simple check to make sure events are valid.
This commit is contained in:
+4
@@ -63,6 +63,10 @@ class EventDeserializer : StdDeserializer<Event>(Event::class.java) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pubKey.isEmpty()) {
|
||||||
|
throw IllegalArgumentException("Event not found")
|
||||||
|
}
|
||||||
|
|
||||||
return EventFactory.create(id, pubKey, createdAt, kind, tags, content, sig)
|
return EventFactory.create(id, pubKey, createdAt, kind, tags, content, sig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user