plugin XEP-0060: added "options" argument to psSubscribe, and return subscription id if present
This commit is contained in:
parent
a7781537d6
commit
4df7673f64
1 changed files with 9 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue