mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-21 16:24:24 +01:00
handle eose notices
This commit is contained in:
@@ -6,4 +6,5 @@ class ClientMessageType:
|
||||
class RelayMessageType:
|
||||
EVENT = "EVENT"
|
||||
NOTICE = "NOTICE"
|
||||
END_OF_STORED_EVENTS = "EOSE"
|
||||
|
||||
@@ -69,6 +69,8 @@ class Relay:
|
||||
message_type = message_json[0]
|
||||
if message_type == RelayMessageType.NOTICE:
|
||||
return True
|
||||
if message_type == RelayMessageType.END_OF_STORED_EVENTS:
|
||||
return True
|
||||
if message_type == RelayMessageType.EVENT:
|
||||
if not len(message_json) == 3:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user