src: matrix: Read user agent name and version from cargo env

This commit is contained in:
mirsal committed 2026-10-07 10:36:38 +00:00
1 parent 624d90f3c9
commit bf6ccc6df1
1 file changed
+3 -1
+3 -1
View File
@@ -133,7 +133,9 @@ async fn login(
match auth_config { match auth_config {
AuthConfig::PasswordAuthConfig{username, password} => { AuthConfig::PasswordAuthConfig{username, password} => {
matrix_auth.login_username(username, password) matrix_auth.login_username(username, password)
.initial_device_display_name("bender v0.2.0").await?; .initial_device_display_name(
format!("{} v{}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")).as_str()
).await?;
}, },
AuthConfig::TokenAuthConfig{user_id, device_id, access_token} => { AuthConfig::TokenAuthConfig{user_id, device_id, access_token} => {
matrix_auth.restore_session( matrix_auth.restore_session(