Get/set pubsub subscription options.

This commit is contained in:
Lance Stout 2011-08-30 22:27:21 -07:00
parent 6b7fde10d3
commit 58a43e40c7

View file

@ -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):