From c8b4df4f849fdf1af0ec2f1fffcb93082a2001ad Mon Sep 17 00:00:00 2001 From: "andri.khrisharyadi" Date: Mon, 3 Apr 2017 18:59:14 +0700 Subject: [PATCH] Fix EnablePushNotificationsIQ wrong form type Should be submit instead of form Fixes SMACK-752 --- .../push_notifications/element/EnablePushNotificationsIQ.java | 2 +- .../push_notifications/EnablePushNotificationsIQTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java index ea403ca3a..1fea8d518 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java @@ -96,7 +96,7 @@ public class EnablePushNotificationsIQ extends IQ { xml.rightAngleBracket(); if (publishOptions != null) { - DataForm dataForm = new DataForm(DataForm.Type.form); + DataForm dataForm = new DataForm(DataForm.Type.submit); FormField formTypeField = new FormField("FORM_TYPE"); formTypeField.addValue(PubSub.NAMESPACE + "#publish-options"); diff --git a/smack-experimental/src/test/java/org/jivesoftware/smackx/push_notifications/EnablePushNotificationsIQTest.java b/smack-experimental/src/test/java/org/jivesoftware/smackx/push_notifications/EnablePushNotificationsIQTest.java index 644c62f83..c42e5bf12 100644 --- a/smack-experimental/src/test/java/org/jivesoftware/smackx/push_notifications/EnablePushNotificationsIQTest.java +++ b/smack-experimental/src/test/java/org/jivesoftware/smackx/push_notifications/EnablePushNotificationsIQTest.java @@ -31,7 +31,7 @@ public class EnablePushNotificationsIQTest { String exampleEnableIQWithPublishOptions = "" + "" - + "" + + "" + "http://jabber.org/protocol/pubsub#publish-options" + "eruio234vzxc2kla-91" + "" + "" + "";