handle eose notices

This commit is contained in:
jeffthibault
2022-07-20 15:06:59 -04:00
parent 9b75acbd9d
commit 8e7263b170
2 changed files with 3 additions and 0 deletions

View File

@@ -6,4 +6,5 @@ class ClientMessageType:
class RelayMessageType:
EVENT = "EVENT"
NOTICE = "NOTICE"
END_OF_STORED_EVENTS = "EOSE"

View File

@@ -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