prevent the presence plugin from generating an illegal show element

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-27 16:25:59 +01:00
parent 406dfdea98
commit ca882fd13a

View file

@ -81,13 +81,13 @@ impl PresencePlugin {
.build(); .build();
stanza.append_child(elem); stanza.append_child(elem);
} }
if show != Show::Available {
let mut elem = Element::builder("show") let mut elem = Element::builder("show")
.ns(ns::CLIENT) .ns(ns::CLIENT)
.build(); .build();
if show != Show::Available {
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(())