XEP-0077: Fix "register" event on stream features.
This commit is contained in:
parent
babd98dac7
commit
6d241be789
@ -203,14 +203,14 @@ class XEP_0077(BasePlugin):
|
|||||||
self.xmpp.del_filter('in', self._force_stream_feature)
|
self.xmpp.del_filter('in', self._force_stream_feature)
|
||||||
return stanza
|
return stanza
|
||||||
|
|
||||||
def _handle_register_feature(self, features):
|
async def _handle_register_feature(self, features):
|
||||||
if 'mechanisms' in self.xmpp.features:
|
if 'mechanisms' in self.xmpp.features:
|
||||||
# We have already logged in with an account
|
# We have already logged in with an account
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.create_account and self.xmpp.event_handled('register'):
|
if self.create_account and self.xmpp.event_handled('register'):
|
||||||
form = self.get_registration()
|
form = await self.get_registration()
|
||||||
self.xmpp.event('register', form)
|
await self.xmpp.event_async('register', form)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user