diff --git a/matrix_sdk_appservice/src/lib.rs b/matrix_sdk_appservice/src/lib.rs index 75e52134..aadbb577 100644 --- a/matrix_sdk_appservice/src/lib.rs +++ b/matrix_sdk_appservice/src/lib.rs @@ -82,6 +82,7 @@ use std::{ fs::File, ops::Deref, path::PathBuf, + sync::Arc, }; use http::Uri; @@ -195,7 +196,7 @@ async fn client_session_with_login_restore( pub struct Appservice { homeserver_url: Url, server_name: ServerNameBox, - registration: AppserviceRegistration, + registration: Arc, client_sender_localpart: Client, } @@ -229,6 +230,8 @@ impl Appservice { ) .await?; + let registration = Arc::new(registration); + Ok(Appservice { homeserver_url, server_name, registration, client_sender_localpart }) }