From cccc05afe9dee47bbe2e825f91e5c03fff282cbd Mon Sep 17 00:00:00 2001 From: Nikita Vilunov Date: Thu, 11 Apr 2024 23:08:09 +0200 Subject: [PATCH] xmpp: ignore text elements with spaces at the stream root --- crates/projection-xmpp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/projection-xmpp/src/lib.rs b/crates/projection-xmpp/src/lib.rs index 8474e8f..c659e5b 100644 --- a/crates/projection-xmpp/src/lib.rs +++ b/crates/projection-xmpp/src/lib.rs @@ -372,7 +372,7 @@ async fn socket_final( res = &mut next_xml_event => 's: { let (ns, event) = res?; if let Event::Text(ref e) = event { - if e.iter().all(|x| *x == 0xA) { + if e.iter().all(|x| *x == b'\n' || *x == b' ') { break 's true; } }