plugin XEP-0060: added "options" argument to psSubscribe, and return subscription id if present

This commit is contained in:
Goffi 2017-11-19 16:41:59 +01:00
commit 4df7673f64

View file

@ -658,14 +658,17 @@ class Subscribe(base.CommandBase):
def add_parser_options(self):
pass
def psSubscribeCb(self):
def psSubscribeCb(self, sub_id):
self.disp(_(u'subscription done'), 1)
if sub_id:
self.disp(_(u'subscription id: {sub_id}').format(sub_id=sub_id))
self.host.quit()
def start(self):
self.host.bridge.psSubscribe(
self.args.service,
self.args.node,
{},
self.profile,
callback=self.psSubscribeCb,
errback=partial(self.errback,