Show error message on account registration

Prefer the error message text over the error code
This commit is contained in:
Philipp Hörist 2018-03-24 17:55:32 +01:00
parent e134e47deb
commit 0fb19c2b1c
1 changed files with 2 additions and 1 deletions

View File

@ -895,8 +895,9 @@ class Connection(CommonConnection, ConnectionHandlers):
if self.new_account_form:
def _on_register_result(result):
if not nbxmpp.isResultNode(result):
reason = result.getErrorMsg() or result.getError()
app.nec.push_incoming_event(AccountNotCreatedEvent(
None, conn=self, reason=result.getError()))
None, conn=self, reason=reason))
return
if app.HAVE_GPG:
self.USE_GPG = True