feat(relay+client): relay reports build version in Ack

Add relay_build field to RegisterPresenceAck so the client logs
which relay version it connected to. Shows in the debug log as
register_signal:ack_received {"relay_build":"f843a93"}.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-12 14:27:58 +04:00
parent f843a934fe
commit 1eb82d77b8
4 changed files with 9 additions and 2 deletions

View File

@@ -716,6 +716,9 @@ pub enum SignalMessage {
success: bool,
#[serde(skip_serializing_if = "Option::is_none")]
error: Option<String>,
/// Relay's build version (git short hash).
#[serde(default, skip_serializing_if = "Option::is_none")]
relay_build: Option<String>,
},
/// Direct call offer routed through the relay to a specific peer.

View File

@@ -1006,6 +1006,7 @@ async fn main() -> anyhow::Result<()> {
let _ = transport.send_signal(&SignalMessage::RegisterPresenceAck {
success: true,
error: None,
relay_build: Some(BUILD_GIT_HASH.to_string()),
}).await;
info!(%addr, fingerprint = %client_fp, alias = ?client_alias, "signal client registered");

View File

@@ -65,6 +65,7 @@ async fn spawn_mock_relay() -> (SocketAddr, tokio::task::JoinHandle<()>) {
.send_signal(&SignalMessage::RegisterPresenceAck {
success: true,
error: None,
relay_build: None,
})
.await;
}