diff --git a/tokio-xmpp/ChangeLog b/tokio-xmpp/ChangeLog index 56481b5b8295f5ae6a4699d0edd407689440402e..44ed8fefcd28403e83df92997ea81c2475f3a5a3 100644 --- a/tokio-xmpp/ChangeLog +++ b/tokio-xmpp/ChangeLog @@ -1,5 +1,7 @@ Version NEXT: 0000-00-00 RELEASER + * Fixed: + - Ignore missing "version" stream attribute for 0114 components. Version 5.0.0: 2025-10-28 pep diff --git a/tokio-xmpp/src/xmlstream/common.rs b/tokio-xmpp/src/xmlstream/common.rs index 1509a36832773c41aa4441750196ab04d7f2c6e2..ca3eb358b6cff4f2683a021991156f54793d5718 100644 --- a/tokio-xmpp/src/xmlstream/common.rs +++ b/tokio-xmpp/src/xmlstream/common.rs @@ -876,10 +876,12 @@ impl StreamHeader<'static> { } } None => { - return Err(io::Error::new( - io::ErrorKind::InvalidData, - "required `version` attribute missing", - )) + if cfg!(not(feature = "component")) { + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "required `version` attribute missing", + )); + } } }