tokio_xmpp: properly process <stream:error/> while waiting for features

Before this, a stream error would not be readable by user code, as the
`recv_features()` function would not even attempt to parse it. This
change allows application code to react to stream errors which are
received before stream features are received.

skip-changelog, because there's no release with the xmlstream module
yet.
This commit is contained in:
Jonas Schäfer 2025-07-13 11:58:37 +02:00
commit e438813fb2
6 changed files with 157 additions and 17 deletions

View file

@ -39,6 +39,15 @@ impl IqHeader {
}
}
/// Payload of an IQ request stanza.
pub enum IqRequestPayload {
/// Payload of a type='get' stanza.
Get(Element),
/// Payload of a type='set' stanza.
Set(Element),
}
/// Payload of an IQ stanza, by type.
pub enum IqPayload {
/// Payload of a type='get' stanza.