Use proper version formatting. Closes #70.

This commit is contained in:
Jack Kingsman
2026-03-18 20:50:56 -07:00
parent 541dba6a75
commit 417a583696
2 changed files with 50 additions and 32 deletions
+5 -3
View File
@@ -115,7 +115,7 @@ def _generate_jwt_token(
"exp": now + _TOKEN_LIFETIME,
"aud": audience,
"owner": pubkey_hex,
"client": _CLIENT_ID,
"client": _get_client_version(),
}
if email:
payload["email"] = email
@@ -260,8 +260,10 @@ def _build_radio_info() -> str:
def _get_client_version() -> str:
"""Return the app version string for community MQTT payloads."""
return get_app_build_info().version
"""Return the canonical client/version identifier for community MQTT."""
build = get_app_build_info()
commit_hash = build.commit_hash or "unknown"
return f"{_CLIENT_ID}/{build.version}-{commit_hash}"
class CommunityMqttPublisher(BaseMqttPublisher):