xmpp: Merge Agent configuration into new Config struct

Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
pep 2025-11-13 23:57:50 +01:00
commit a1a31ce11c
8 changed files with 65 additions and 68 deletions

View file

@ -19,8 +19,11 @@ pub async fn wait_for_events(agent: &mut Agent) -> Vec<Event> {
match event {
TokioXmppEvent::Online { resumed: false, .. } => {
let presence =
presence::send::make_initial_presence(&agent.disco, &agent.node).into();
let presence = presence::send::make_initial_presence(
&agent.disco,
&agent.config.read().await.website,
)
.into();
let _ = agent.client.send_stanza(presence).await;
events.push(Event::Online);
// TODO: only send this when the ContactList feature is enabled.