diff --git a/examples/src/connect.cpp b/examples/src/connect.cpp index 5c4e064..a7abdce 100644 --- a/examples/src/connect.cpp +++ b/examples/src/connect.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -13,6 +14,11 @@ auto Coroutine() -> boost::asio::awaitable { auto client = co_await larra::xmpp::client::CreateClient>( larra::xmpp::PlainUserAccount{.jid = {.username = "test1", .server = "localhost"}, .password = "test1"}, {.useTls = larra::xmpp::client::Options::kNever}); + co_await std::visit( + [](auto& client) -> boost::asio::awaitable { + co_await client.Send(larra::xmpp::presence::c2s::Available{}); + }, + client); } catch(const std::exception& err) { SPDLOG_ERROR("{}", err.what()); co_return;