Support creating devices without access_tokens.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-27 03:10:41 +00:00
parent a39ef994d2
commit a30c043386
4 changed files with 18 additions and 8 deletions

View File

@@ -97,7 +97,7 @@ pub(crate) async fn update_device_route(
.create_device(
sender_user,
&device_id,
(&appservice.registration.as_token, None),
(Some(&appservice.registration.as_token), None),
None,
None,
Some(client.to_string()),

View File

@@ -446,7 +446,7 @@ pub(crate) async fn register_route(
.create_device(
&user_id,
&device_id,
(&access_token, expires_in),
(Some(&access_token), expires_in),
refresh_token.as_deref(),
body.initial_device_display_name.clone(),
Some(client.to_string()),

View File

@@ -116,7 +116,7 @@ pub(crate) async fn login_route(
.create_device(
&user_id,
&device_id,
(&access_token, expires_in),
(Some(&access_token), expires_in),
refresh_token.as_deref(),
body.initial_device_display_name.clone(),
Some(client.to_string()),