aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp/forms/Data.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/forms/Data.java')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/forms/Data.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/forms/Data.java b/src/main/java/eu/siacs/conversations/xmpp/forms/Data.java
index ff9acb3f..44794c80 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/forms/Data.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/forms/Data.java
@@ -37,6 +37,7 @@ public class Data extends Element {
Field field = getFieldByName(name);
if (field == null) {
field = new Field(name);
+ this.addChild(field);
}
field.setValue(value);
}
@@ -45,6 +46,7 @@ public class Data extends Element {
Field field = getFieldByName(name);
if (field == null) {
field = new Field(name);
+ this.addChild(field);
}
field.setValues(values);
}
@@ -72,4 +74,12 @@ public class Data extends Element {
data.setChildren(element.getChildren());
return data;
}
+
+ public void setFormType(String formType) {
+ this.put("FORM_TYPE",formType);
+ }
+
+ public String getFormType() {
+ return this.getAttribute("FORM_TYPE");
+ }
}