mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
prevent the presence plugin from generating an illegal show element
This commit is contained in:
parent
406dfdea98
commit
ca882fd13a
1 changed files with 4 additions and 4 deletions
|
@ -81,13 +81,13 @@ impl PresencePlugin {
|
||||||
.build();
|
.build();
|
||||||
stanza.append_child(elem);
|
stanza.append_child(elem);
|
||||||
}
|
}
|
||||||
let mut elem = Element::builder("show")
|
|
||||||
.ns(ns::CLIENT)
|
|
||||||
.build();
|
|
||||||
if show != Show::Available {
|
if show != Show::Available {
|
||||||
|
let mut elem = Element::builder("show")
|
||||||
|
.ns(ns::CLIENT)
|
||||||
|
.build();
|
||||||
elem.append_text_node(show.to_string());
|
elem.append_text_node(show.to_string());
|
||||||
|
stanza.append_child(elem);
|
||||||
}
|
}
|
||||||
stanza.append_child(elem);
|
|
||||||
self.proxy.send(stanza);
|
self.proxy.send(stanza);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue