feat: add external id for users (#3219)

This commit is contained in:
Vlad Stan
2025-07-08 10:17:16 +02:00
committed by dni ⚡
parent ff24847980
commit c7b7832a88
11 changed files with 458 additions and 25 deletions
+8
View File
@@ -198,6 +198,14 @@ def is_valid_username(username: str) -> bool:
return re.fullmatch(username_regex, username) is not None
def is_valid_external_id(external_id: str) -> bool:
if len(external_id) > 256:
return False
if " " in external_id or "\n" in external_id:
return False
return True
def is_valid_pubkey(pubkey: str) -> bool:
if len(pubkey) != 64:
return False