diff --git a/src/jingle_ibb.rs b/src/jingle_ibb.rs index 4ab73e68..29590cba 100644 --- a/src/jingle_ibb.rs +++ b/src/jingle_ibb.rs @@ -44,6 +44,15 @@ pub fn parse_jingle_ibb(root: &Element) -> Result { } } +pub fn serialise(transport: &Transport) -> Element { + Element::builder("transport") + .ns(ns::JINGLE_IBB) + .attr("block-size", format!("{}", transport.block_size)) + .attr("sid", transport.sid.clone()) + .attr("stanza", transport.stanza.clone()) + .build() +} + #[cfg(test)] mod tests { use minidom::Element;