diff --git a/src/body.rs b/src/body.rs index dcc4389d..f170cd38 100644 --- a/src/body.rs +++ b/src/body.rs @@ -17,6 +17,13 @@ pub fn parse_body(root: &Element) -> Result { Ok(root.text()) } +pub fn serialise(body: &Body) -> Element { + Element::builder("body") + .ns(ns::JABBER_CLIENT) + .append(body.to_owned()) + .build() +} + #[cfg(test)] mod tests { use minidom::Element;