jp (profile): fixed creating profile with given JID and XMPP password
This commit is contained in:
parent
40ee9564c6
commit
030f20f7d8
1 changed files with 4 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ class ProfileCreate(base.CommandBase):
|
|||
self.parser.add_argument('-x', '--xmpp-password', type=str, help=_('the password of the XMPP account (use profile password if not specified)'),
|
||||
metavar='PASSWORD')
|
||||
|
||||
def _profile_created(self):
|
||||
def _session_started(self, dummy):
|
||||
if self.args.jid:
|
||||
self.host.bridge.setParam("JabberID", self.args.jid, "Connection" ,profile_key=self.args.profile)
|
||||
xmpp_pwd = self.args.password or self.args.xmpp_password
|
||||
|
|
@ -129,6 +129,9 @@ class ProfileCreate(base.CommandBase):
|
|||
self.host.bridge.setParam("Password", xmpp_pwd, "Connection", profile_key=self.args.profile)
|
||||
self.host.quit()
|
||||
|
||||
def _profile_created(self):
|
||||
self.host.bridge.profileStartSession(self.args.password, self.args.profile, callback=self._session_started, errback=None)
|
||||
|
||||
def run(self):
|
||||
"""Create a new profile"""
|
||||
self.need_loop = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue