summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java4
-rw-r--r--test/com/isode/stroke/serializer/payloadserializers/FormSerializerTest.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java b/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
index c2a2189..9ab5e37 100644
--- a/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
+++ b/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
@@ -191,12 +191,12 @@ public class FormSerializer extends GenericPayloadSerializer<Form> {
private static void serializeValueAsString(GenericFormField<String> field,
XMLElement parent) {
String value = field.getValue();
- if (!value.isEmpty()) {
+ // FIXME with the proper fix after Swiften is fixed: if (!value.isEmpty()) {
XMLElement valueElement = new XMLElement(
FormField.FORM_FIELD_ELEMENT_VALUE);
valueElement.addNode(XMLTextNode.create(value));
parent.addNode(valueElement);
- }
+ // }
}
@Override
diff --git a/test/com/isode/stroke/serializer/payloadserializers/FormSerializerTest.java b/test/com/isode/stroke/serializer/payloadserializers/FormSerializerTest.java
index 4a1ccc0..7636eb4 100644
--- a/test/com/isode/stroke/serializer/payloadserializers/FormSerializerTest.java
+++ b/test/com/isode/stroke/serializer/payloadserializers/FormSerializerTest.java
@@ -125,13 +125,13 @@ public class FormSerializerTest {
+ "<value>jabber:bot</value>"
+ "</field>"
+ "<field type=\"fixed\"><value>Section 1: Bot Info</value></field>"
- + "<field label=\"The name of your bot\" type=\"text-single\" var=\"botname\"/>"
+ + "<field label=\"The name of your bot\" type=\"text-single\" var=\"botname\"><value></value></field>"
+ "<field label=\"Helpful description of your bot\" type=\"text-multi\" var=\"description\"><value>This is a bot.</value><value>A quite good one actually</value></field>"
+ "<field label=\"Public bot?\" type=\"boolean\" var=\"public\">"
+ "<required/>"
+ "<value>1</value>"
+ "</field>"
- + "<field label=\"Password for special access\" type=\"text-private\" var=\"password\"/>"
+ + "<field label=\"Password for special access\" type=\"text-private\" var=\"password\"><value></value></field>"
+ "<field label=\"What features will the bot support?\" type=\"list-multi\" var=\"features\">"
+ "<value>news</value>"
+ "<value>search</value>"