summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-30 22:45:08 -0700
committerLance Stout <lancestout@gmail.com>2011-08-30 22:45:08 -0700
commit33ac0c9dd60192c513617d0108c152bd8b75237b (patch)
treecbc82bc66ce97c099b53a86abb085b923ce337fa
parent58a43e40c71a1095d91b4fa9d852ec07f0bec19f (diff)
parent4699bdff6046e37d9fe4a8c1e29923e239126908 (diff)
downloadslixmpp-33ac0c9dd60192c513617d0108c152bd8b75237b.tar.gz
slixmpp-33ac0c9dd60192c513617d0108c152bd8b75237b.tar.bz2
slixmpp-33ac0c9dd60192c513617d0108c152bd8b75237b.tar.xz
slixmpp-33ac0c9dd60192c513617d0108c152bd8b75237b.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
-rw-r--r--sleekxmpp/plugins/xep_0060/stanza/pubsub.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0060/stanza/pubsub.py b/sleekxmpp/plugins/xep_0060/stanza/pubsub.py
index 7a61a9fe..4967e1a7 100644
--- a/sleekxmpp/plugins/xep_0060/stanza/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/stanza/pubsub.py
@@ -243,6 +243,31 @@ class Options(ElementBase):
registerStanzaPlugin(Pubsub, Options)
registerStanzaPlugin(Subscribe, Options)
+class PublishOptions(ElementBase):
+ namespace = 'http://jabber.org/protocol/pubsub'
+ name = 'publish-options'
+ plugin_attrib = 'publish_options'
+ interfaces = set(('publish_options'))
+ plugin_attrib_map = {}
+ plugin_tag_map = {}
+
+ def get_publish_options(self):
+ config = self.xml.find('{jabber:x:data}x')
+ form = xep_0004.Form()
+ if config is not None:
+ form.fromXML(config)
+ return form
+
+ def set_publish_options(self, value):
+ self.xml.append(value.getXML())
+ return self
+
+ def del_publish_options(self):
+ config = self.xml.find('{jabber:x:data}x')
+ self.xml.remove(config)
+
+registerStanzaPlugin(Pubsub, PublishOptions)
+
class PubsubState(ElementBase):
namespace = 'http://jabber.org/protocol/psstate'
name = 'state'