appservice: Put registration into Arc
parent
aaa17535ac
commit
20454e1666
|
@ -82,6 +82,7 @@ use std::{
|
||||||
fs::File,
|
fs::File,
|
||||||
ops::Deref,
|
ops::Deref,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
|
sync::Arc,
|
||||||
};
|
};
|
||||||
|
|
||||||
use http::Uri;
|
use http::Uri;
|
||||||
|
@ -195,7 +196,7 @@ async fn client_session_with_login_restore(
|
||||||
pub struct Appservice {
|
pub struct Appservice {
|
||||||
homeserver_url: Url,
|
homeserver_url: Url,
|
||||||
server_name: ServerNameBox,
|
server_name: ServerNameBox,
|
||||||
registration: AppserviceRegistration,
|
registration: Arc<AppserviceRegistration>,
|
||||||
client_sender_localpart: Client,
|
client_sender_localpart: Client,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +230,8 @@ impl Appservice {
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
let registration = Arc::new(registration);
|
||||||
|
|
||||||
Ok(Appservice { homeserver_url, server_name, registration, client_sender_localpart })
|
Ok(Appservice { homeserver_url, server_name, registration, client_sender_localpart })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue