src: matrix: Read user agent name and version from cargo env
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -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(
|
||||||
|
|||||||
Reference in new issue
Block a user