Add default node nickname
This commit is contained in:
@@ -8,6 +8,7 @@ from drb_cdb_types import ConfigGenerator, TalkgroupTag
|
||||
from server_api import RadioAPIClient
|
||||
from enum import Enum
|
||||
from config import Config
|
||||
from utils import generate_node_nickname
|
||||
|
||||
app_conf = Config()
|
||||
|
||||
@@ -21,7 +22,9 @@ if not app_conf.get("client_id"):
|
||||
app_conf.set("client_id", f"client-{uuid.uuid4().hex[:8]}")
|
||||
CLIENT_ID = app_conf.client_id
|
||||
|
||||
# Get the nickname (even if it's empty)
|
||||
# Get the nickname or set the reg ID
|
||||
if not app_conf.get("nickname"):
|
||||
app_conf.set("nickname", generate_node_nickname())
|
||||
NICKNAME = app_conf.get("nickname")
|
||||
# ----------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user