Show error message on account registration
Prefer the error message text over the error code
This commit is contained in:
parent
e134e47deb
commit
0fb19c2b1c
|
@ -895,8 +895,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
if self.new_account_form:
|
if self.new_account_form:
|
||||||
def _on_register_result(result):
|
def _on_register_result(result):
|
||||||
if not nbxmpp.isResultNode(result):
|
if not nbxmpp.isResultNode(result):
|
||||||
|
reason = result.getErrorMsg() or result.getError()
|
||||||
app.nec.push_incoming_event(AccountNotCreatedEvent(
|
app.nec.push_incoming_event(AccountNotCreatedEvent(
|
||||||
None, conn=self, reason=result.getError()))
|
None, conn=self, reason=reason))
|
||||||
return
|
return
|
||||||
if app.HAVE_GPG:
|
if app.HAVE_GPG:
|
||||||
self.USE_GPG = True
|
self.USE_GPG = True
|
||||||
|
|
Loading…
Reference in New Issue