From 2388f23b4eee34290f7f8435d6164feb37f99076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 18 Aug 2024 15:08:21 +0200 Subject: [PATCH] xmlstream: support receiving stream errors --- tokio-xmpp/src/xmlstream/xmpp.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tokio-xmpp/src/xmlstream/xmpp.rs b/tokio-xmpp/src/xmlstream/xmpp.rs index 9cee7e47..af32cac5 100644 --- a/tokio-xmpp/src/xmlstream/xmpp.rs +++ b/tokio-xmpp/src/xmlstream/xmpp.rs @@ -6,7 +6,10 @@ use xso::{AsXml, FromXml}; -use xmpp_parsers::{component, iq::Iq, message::Message, presence::Presence, sasl, starttls}; +use xmpp_parsers::{ + component, iq::Iq, message::Message, presence::Presence, sasl, starttls, + stream_error::ReceivedStreamError, +}; /// Any valid XMPP stream-level element. #[derive(FromXml, AsXml, Debug)] @@ -35,4 +38,8 @@ pub enum XmppStreamElement { /// Component protocol nonzas #[xml(transparent)] ComponentHandshake(component::Handshake), + + /// Stream error received + #[xml(transparent)] + StreamError(ReceivedStreamError), }