Room version based on room ID

This commit is contained in:
2025-10-07 16:21:28 -04:00
parent 316358a82a
commit 7e77f009db
4 changed files with 33 additions and 10 deletions

View File

@@ -4,14 +4,13 @@ import tomllib
addr: str = "127.0.0.1"
port: int = 5000
allow_registration: bool = False
users_can_register: bool = False
the_funny_number: int = 1337
cat: str = "/etc/vona/cat.jpg"
server_name: str = ""
signing_key: str = ""
support: dict = {"contacts": []}
users_can_register: bool = False
_CONFIG_PATH = Path("/etc/vona/config.toml")
@@ -57,7 +56,7 @@ def _validate_cat_path(cat_path: str) -> Path:
def _apply_config(cfg: dict) -> None:
global addr, port, allow_registration, server_name, signing_key, cat, support
global addr, port, server_name, signing_key, cat, support, users_can_register
if "address" in cfg:
addr = str(cfg["address"])
@@ -68,9 +67,6 @@ def _apply_config(cfg: dict) -> None:
except (TypeError, ValueError):
_warn(f"Invalid port in config: {cfg.get('port')}; using default {port}")
if "allow_registration" in cfg:
allow_registration = bool(cfg["allow_registration"])
if "server_name" in cfg:
server_name = str(cfg["server_name"])
else: