summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0060/pubsub.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-09-01 13:25:35 -0700
committerLance Stout <lancestout@gmail.com>2011-09-01 13:25:35 -0700
commitd7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6 (patch)
tree00e289fb37f49efb011d4c21d051cea316be9bca /sleekxmpp/plugins/xep_0060/pubsub.py
parent8471a485d1f9be3dc1f1c022ff49bee0b292cb6d (diff)
downloadslixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.gz
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.bz2
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.xz
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.zip
Add ability to get global/node default subscription options.
Diffstat (limited to 'sleekxmpp/plugins/xep_0060/pubsub.py')
-rw-r--r--sleekxmpp/plugins/xep_0060/pubsub.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py
index 5a9fe70c..2a31e374 100644
--- a/sleekxmpp/plugins/xep_0060/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/pubsub.py
@@ -183,11 +183,14 @@ class xep_0060(base_plugin):
iq['pubsub']['affiliations']['node'] = node
return iq.send(block=block, callback=callback, timeout=timeout)
- def get_subscription_options(self, jid, node, user_jid, ifrom=None,
+ def get_subscription_options(self, jid, node=None, user_jid=None, 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
+ if user_jid is None:
+ iq['pubsub']['default']['node'] = node
+ else:
+ 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, jid, node, user_jid, options,