message, iq, presence, stanza_error, forwarded: Add support for components hidden behind the component feature flag.

This commit is contained in:
Emmanuel Gil Peyrot 2017-07-29 06:49:02 +01:00
commit 69cc83c456
8 changed files with 161 additions and 28 deletions

View file

@ -34,9 +34,9 @@ impl TryFrom<Element> for Forwarded {
for child in elem.children() {
if child.is("delay", ns::DELAY) {
delay = Some(Delay::try_from(child.clone())?);
} else if child.is("message", ns::JABBER_CLIENT) {
} else if child.is("message", ns::DEFAULT_NS) {
stanza = Some(Message::try_from(child.clone())?);
// TODO: also handle the five other possibilities.
// TODO: also handle the two other possibilities.
} else {
return Err(Error::ParseError("Unknown child in forwarded element."));
}