forked from lavina/lavina
1
0
Fork 0

xmpp: ignore text elements with spaces at the stream root

This commit is contained in:
Nikita Vilunov 2024-04-11 23:08:09 +02:00
parent 8b099f9be2
commit cccc05afe9
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ async fn socket_final(
res = &mut next_xml_event => 's: { res = &mut next_xml_event => 's: {
let (ns, event) = res?; let (ns, event) = res?;
if let Event::Text(ref e) = event { 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; break 's true;
} }
} }