Move make_initial_presence to presence::send module

This commit is contained in:
xmppftw xmppftw 2023-12-30 00:21:32 +01:00
commit 7622721ec6
4 changed files with 25 additions and 13 deletions

View file

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