mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 15:24:19 +01:00
add is_valid method to RelayMessageType class
This commit is contained in:
@@ -8,3 +8,8 @@ class RelayMessageType:
|
||||
NOTICE = "NOTICE"
|
||||
END_OF_STORED_EVENTS = "EOSE"
|
||||
|
||||
@staticmethod
|
||||
def is_valid(type: str) -> bool:
|
||||
if type == RelayMessageType.EVENT or type == RelayMessageType.NOTICE or type == RelayMessageType.END_OF_STORED_EVENTS:
|
||||
return True
|
||||
return False
|
||||
Reference in New Issue
Block a user