xmpp: extend escape-hatch feature to the receiving part

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2025-08-26 23:28:05 +02:00 committed by Link Mauve
commit 3e794d3f50
3 changed files with 7 additions and 1 deletions

View file

@ -112,4 +112,6 @@ pub enum Event {
ServiceMessage(Option<MessageId>, BareJid, String, StanzaTimeInfo),
/// A file has been uploaded over HTTP; contains the URL of the file.
HttpUploadedFile(String),
#[cfg(feature = "escape-hatch")]
TokioXmppEvent(TokioXmppEvent),
}

View file

@ -17,6 +17,9 @@ pub async fn wait_for_events(agent: &mut Agent) -> Vec<Event> {
if let Some(event) = agent.client.next().await {
let mut events = Vec::new();
#[cfg(feature = "escape-hatch")]
events.push(Event::TokioXmppEvent(event.clone()));
match event {
TokioXmppEvent::Online { resumed: false, .. } => {
let presence =