xmpp: make Agent.config accessible only via getter
It may not matter much for the moment as this struct shouldn't change very much during the life of the client, but this prevents the lock from being held too long. Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
a1a31ce11c
commit
e22daa91f1
7 changed files with 17 additions and 12 deletions
|
|
@ -21,7 +21,7 @@ pub async fn wait_for_events(agent: &mut Agent) -> Vec<Event> {
|
|||
TokioXmppEvent::Online { resumed: false, .. } => {
|
||||
let presence = presence::send::make_initial_presence(
|
||||
&agent.disco,
|
||||
&agent.config.read().await.website,
|
||||
&agent.get_config().await.website,
|
||||
)
|
||||
.into();
|
||||
let _ = agent.client.send_stanza(presence).await;
|
||||
|
|
|
|||
Loading…
Reference in a new issue