Skip to content

Commit 4eb3cc9

Browse files
committed
refactor(ffi): Remove unused Session::homeserver_url value
1 parent 95d8ba9 commit 4eb3cc9

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,10 +2100,9 @@ impl Client {
21002100
fn session_inner(client: matrix_sdk::Client) -> Result<Session, ClientError> {
21012101
let auth_api = client.auth_api().context("Missing authentication API")?;
21022102

2103-
let homeserver_url = client.homeserver().into();
21042103
let sliding_sync_version = client.sliding_sync_version();
21052104

2106-
Session::new(auth_api, homeserver_url, sliding_sync_version.into())
2105+
Session::new(auth_api, sliding_sync_version.into())
21072106
}
21082107

21092108
fn save_session(
@@ -2395,8 +2394,6 @@ pub struct Session {
23952394
pub device_id: String,
23962395

23972396
// FFI-only fields (for now)
2398-
/// The URL for the homeserver used for this session.
2399-
pub homeserver_url: String,
24002397
/// Additional data for this session if OpenID Connect was used for
24012398
/// authentication.
24022399
pub oidc_data: Option<String>,
@@ -2407,7 +2404,6 @@ pub struct Session {
24072404
impl Session {
24082405
fn new(
24092406
auth_api: AuthApi,
2410-
homeserver_url: String,
24112407
sliding_sync_version: SlidingSyncVersion,
24122408
) -> Result<Session, ClientError> {
24132409
match auth_api {
@@ -2423,7 +2419,6 @@ impl Session {
24232419
refresh_token,
24242420
user_id: user_id.to_string(),
24252421
device_id: device_id.to_string(),
2426-
homeserver_url,
24272422
oidc_data: None,
24282423
sliding_sync_version,
24292424
})
@@ -2443,7 +2438,6 @@ impl Session {
24432438
refresh_token,
24442439
user_id: user_id.to_string(),
24452440
device_id: device_id.to_string(),
2446-
homeserver_url,
24472441
oidc_data,
24482442
sliding_sync_version,
24492443
})
@@ -2465,7 +2459,6 @@ impl TryFrom<Session> for AuthSession {
24652459
refresh_token,
24662460
user_id,
24672461
device_id,
2468-
homeserver_url: _,
24692462
oidc_data,
24702463
sliding_sync_version: _,
24712464
} = value;

0 commit comments

Comments
 (0)