mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
data_forms: Fix FORM_TYPE, <title/> and <instructions/> serialisation.
This commit is contained in:
parent
13e8507848
commit
a48565e171
1 changed files with 2 additions and 3 deletions
|
@ -229,9 +229,8 @@ impl From<DataForm> for Element {
|
|||
Element::builder("x")
|
||||
.ns(ns::DATA_FORMS)
|
||||
.attr("type", form.type_)
|
||||
.append(form.form_type)
|
||||
.append(form.title)
|
||||
.append(form.instructions)
|
||||
.append(if form.title.is_some() { Some(Element::builder("title").ns(ns::DATA_FORMS).append(form.title)) } else { None })
|
||||
.append(if form.instructions.is_some() { Some(Element::builder("instructions").ns(ns::DATA_FORMS).append(form.instructions)) } else { None })
|
||||
.append(form.fields)
|
||||
.build()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue