feat: add delete post tests
This commit is contained in:
parent
b0be06580a
commit
01764c155e
4 changed files with 111 additions and 11 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue