Initial AUTH support

This commit is contained in:
vic
2023-10-25 20:15:18 -04:00
parent 8086e4d8ba
commit d42448f300
4 changed files with 31 additions and 5 deletions

View File

@@ -2,14 +2,16 @@ class ClientMessageType:
EVENT = "EVENT"
REQUEST = "REQ"
CLOSE = "CLOSE"
AUTH = "AUTH"
class RelayMessageType:
EVENT = "EVENT"
NOTICE = "NOTICE"
END_OF_STORED_EVENTS = "EOSE"
AUTH = "AUTH"
@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
return False