summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0060/pubsub.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-09-01 11:19:25 -0700
committerLance Stout <lancestout@gmail.com>2011-09-01 11:19:25 -0700
commitec01e45ed1f811a88c39f17f92a30f2f225a6ebc (patch)
tree4f2bb8c93b0a400fbcb35d280dee26f2908c88da /sleekxmpp/plugins/xep_0060/pubsub.py
parent993829b23f923bc76aa0680977b34995105752ae (diff)
downloadslixmpp-ec01e45ed1f811a88c39f17f92a30f2f225a6ebc.tar.gz
slixmpp-ec01e45ed1f811a88c39f17f92a30f2f225a6ebc.tar.bz2
slixmpp-ec01e45ed1f811a88c39f17f92a30f2f225a6ebc.tar.xz
slixmpp-ec01e45ed1f811a88c39f17f92a30f2f225a6ebc.zip
Add ability for a user to get retrieve subscriptions, with tests.
Diffstat (limited to 'sleekxmpp/plugins/xep_0060/pubsub.py')
-rw-r--r--sleekxmpp/plugins/xep_0060/pubsub.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py
index 788d3397..990e8241 100644
--- a/sleekxmpp/plugins/xep_0060/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/pubsub.py
@@ -171,6 +171,12 @@ class xep_0060(base_plugin):
iq['pubsub']['unsubscribe']['subid'] = subid
return iq.send(block=block, callback=callback, timeout=timeout)
+ def get_subscriptions(self, jid, node=None, ifrom=None, block=True,
+ callback=None, timeout=None):
+ iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get')
+ iq['pubsub']['subscriptions']['node'] = node
+ return iq.send(block=block, callback=callback, timeout=timeout)
+
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')