1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 13:32:07 +01:00

Merge pull request #122 from andrisasuke/fix-enable-push-formtype

Fix enable push notification IQ form type
This commit is contained in:
Florian Schmaus 2017-04-03 15:07:29 +02:00 committed by GitHub
commit e6787b21ce
2 changed files with 2 additions and 2 deletions

View file

@ -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");

View file

@ -31,7 +31,7 @@ public class EnablePushNotificationsIQTest {
String exampleEnableIQWithPublishOptions = "<iq id='x42' type='set'>"
+ "<enable xmlns='urn:xmpp:push:0' jid='push-5.client.example' node='yxs32uqsflafdk3iuqo'>"
+ "<x xmlns='jabber:x:data' type='form'>"
+ "<x xmlns='jabber:x:data' type='submit'>"
+ "<field var='FORM_TYPE'><value>http://jabber.org/protocol/pubsub#publish-options</value></field>"
+ "<field var='secret'><value>eruio234vzxc2kla-91</value></field>" + "</x>" + "</enable>" + "</iq>";