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
@ -50,7 +50,7 @@ class XEP_0077(BasePlugin):
|
|||||||
# We have already logged in with an account
|
# We have already logged in with an account
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.create_account:
|
if self.create_account and self.xmpp.event_handled('register'):
|
||||||
form = self.get_registration()
|
form = self.get_registration()
|
||||||
self.xmpp.event('register', form, direct=True)
|
self.xmpp.event('register', form, direct=True)
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user