feat: add delete post tests

This commit is contained in:
Vlad Stan 2023-02-03 15:45:23 +02:00
parent b0be06580a
commit 01764c155e
4 changed files with 111 additions and 11 deletions

View file

@ -48,6 +48,9 @@ class NostrEvent(BaseModel):
id = hashlib.sha256(data.encode()).hexdigest()
return id
def is_delete_event(self) -> bool:
return self.kind == 5
def check_signature(self):
event_id = self.event_id
if self.id != event_id: