Don't request registration forms unless the register event is handled.
Some servers end the stream if registration can not be completed in-band, which means always requesting the form can prevent regular login.
This commit is contained in:
parent
e29a9e0394
commit
db0e683d01
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ class XEP_0077(BasePlugin):
|
|||
# We have already logged in with an account
|
||||
return False
|
||||
|
||||
if self.create_account:
|
||||
if self.create_account and self.xmpp.event_handled('register'):
|
||||
form = self.get_registration()
|
||||
self.xmpp.event('register', form, direct=True)
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue