changeset 2200:95dc90f1065a

tmp (wokkel/pubsub): fixed configuration setting
author Goffi <goffi@goffi.org>
date Thu, 23 Mar 2017 09:07:10 +0100
parents ea0d0a4e2ad8
children 40dd9eb2692c
files src/tmp/wokkel/pubsub.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/tmp/wokkel/pubsub.py	Tue Mar 14 00:21:20 2017 +0100
+++ b/src/tmp/wokkel/pubsub.py	Thu Mar 23 09:07:10 2017 +0100
@@ -471,7 +471,7 @@
         Parse optional node configuration form in create request.
         """
         for element in verbElement.parent.elements():
-            if element.uri == NS_PUBSUB and element.name == 'configure':
+            if element.uri == NS_PUBSUB_OWNER and element.name == 'configure':
                 form = data_form.findForm(element, NS_PUBSUB_NODE_CONFIG)
                 if form is not None:
                     if form.formType != 'submit':
@@ -488,7 +488,10 @@
         Render optional node configuration form in create request.
         """
         if self.options is not None:
-            configure = verbElement.parent.addElement('configure')
+            if verbElement.name == 'configure':
+                configure = verbElement
+            else:
+                configure = verbElement.parent.addElement('configure')
             configure.addChild(self.options.toElement())
 
 
@@ -1266,7 +1269,6 @@
 
     def _onPubSubRequest(self, iq):
         request = self._request_class.fromElement(iq)
-
         if self.resource is not None:
             resource = self.resource.locateResource(request)
         else: