summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0060.py
diff options
context:
space:
mode:
authorfritzy <fritzy@ip-10-251-242-239.ec2.internal>2010-08-21 22:48:43 +0000
committerfritzy <fritzy@ip-10-251-242-239.ec2.internal>2010-08-21 22:48:43 +0000
commit345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4 (patch)
treeca0c851734641f6c4a0169528eee19bd706191be /sleekxmpp/plugins/xep_0060.py
parentc05ddcb7f5eaa5bbf7efb4e765d04b62212a3394 (diff)
downloadslixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.gz
slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.bz2
slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.xz
slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.zip
added form compatibility with old api, stanzas now bool() to True on 2.x, jid attributes will return '' if not set
Diffstat (limited to 'sleekxmpp/plugins/xep_0060.py')
-rw-r--r--sleekxmpp/plugins/xep_0060.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0060.py b/sleekxmpp/plugins/xep_0060.py
index a92a3844..0b056f0b 100644
--- a/sleekxmpp/plugins/xep_0060.py
+++ b/sleekxmpp/plugins/xep_0060.py
@@ -4,6 +4,7 @@ import logging
#from xml.etree import cElementTree as ET
from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET
from . import stanza_pubsub
+from . xep_0004 import Form
class xep_0060(base.base_plugin):
"""
@@ -41,7 +42,8 @@ class xep_0060(base.base_plugin):
submitform.field['pubsub#node_type'].setValue('leaf')
else:
submitform.addField('pubsub#node_type', value='leaf')
- configure.append(submitform.getXML('submit'))
+ submitform['type'] = 'submit'
+ configure.append(submitform.xml)
pubsub.append(configure)
iq = self.xmpp.makeIqSet(pubsub)
iq.attrib['to'] = jid
@@ -117,7 +119,7 @@ class xep_0060(base.base_plugin):
if not form or form is None:
logging.error("No form found.")
return False
- return self.xmpp.plugin['xep_0004'].buildForm(form)
+ return Form(xml=form)
def getNodeSubscriptions(self, jid, node):
pubsub = ET.Element('{http://jabber.org/protocol/pubsub#owner}pubsub')