summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-30 22:27:21 -0700
committerLance Stout <lancestout@gmail.com>2011-08-30 22:27:21 -0700
commit58a43e40c71a1095d91b4fa9d852ec07f0bec19f (patch)
treee2cf9639d9eb2f964b0a0a7fab685e16158aa573 /sleekxmpp/plugins
parent6b7fde10d3a63353f303abd969bb2c47d3ae3d5f (diff)
downloadslixmpp-58a43e40c71a1095d91b4fa9d852ec07f0bec19f.tar.gz
slixmpp-58a43e40c71a1095d91b4fa9d852ec07f0bec19f.tar.bz2
slixmpp-58a43e40c71a1095d91b4fa9d852ec07f0bec19f.tar.xz
slixmpp-58a43e40c71a1095d91b4fa9d852ec07f0bec19f.zip
Get/set pubsub subscription options.
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0060/pubsub.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py
index f9999f73..9ce643d9 100644
--- a/sleekxmpp/plugins/xep_0060/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/pubsub.py
@@ -169,11 +169,21 @@ class xep_0060(base_plugin):
iq['pubsub']['unsubscribe']['subid'] = subid
return iq.send(block=block, callback=callback, timeout=timeout)
- def get_subscription_options(self):
- pass
+ def get_subscription_options(self, jid, node, user_jid, ifrom=None,
+ block=True, callback=None, timeout=None):
+ iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get')
+ iq['pubsub']['options']['node'] = node
+ iq['pubsub']['options']['jid'] = user_jid
+ return iq.send(block=block, callback=callback, timeout=timeout)
- def set_subscription_options(self):
- pass
+ def set_subscription_options(self, jid, node, user_jid, options,
+ ifrom=None, block=True, callback=None,
+ timeout=None):
+ iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get')
+ iq['pubsub']['options']['node'] = node
+ iq['pubsub']['options']['jid'] = user_jid
+ iq['pubsub']['options'].append(options)
+ return iq.send(block=block, callback=callback, timeout=timeout)
def get_node_config(self, jid, node=None, ifrom=None, block=None,
callback=None, timeout=None):