nostrclient/nostr/message_type.py
Vlad Stan f369e2fdac Revert "chore: code format"
This reverts commit 619e0f05e2.
2023-03-23 10:57:29 +02:00

15 lines
No EOL
413 B
Python

class ClientMessageType:
EVENT = "EVENT"
REQUEST = "REQ"
CLOSE = "CLOSE"
class RelayMessageType:
EVENT = "EVENT"
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