Fixed broken registration for a new account. Fixed typos
This commit is contained in:
parent
be50530d6d
commit
98e89a5204
|
@ -829,16 +829,17 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
reason = _('Server %(name)s answered wrongly to '
|
reason = _('Server %(name)s answered wrongly to '
|
||||||
'register request: %(error)s') % {'name': data[0],
|
'register request: %(error)s') % {'name': data[0],
|
||||||
'error': data[3]}
|
'error': data[3]}
|
||||||
gajim.nec.push_incoming_event(AccountNotCreated(None,
|
gajim.nec.push_incoming_event(AccountNotCreatedEvent(
|
||||||
conn=self, reason=reason))
|
None, conn=self, reason=reason))
|
||||||
return
|
return
|
||||||
is_form = data[2]
|
is_form = data[2]
|
||||||
conf = data[1]
|
conf = data[1]
|
||||||
helpers.replace_dataform_media(conf, data[4])
|
if data[4] is not '':
|
||||||
|
helpers.replace_dataform_media(conf, data[4])
|
||||||
if self.new_account_form:
|
if self.new_account_form:
|
||||||
def _on_register_result(result):
|
def _on_register_result(result):
|
||||||
if not common.xmpp.isResultNode(result):
|
if not common.xmpp.isResultNode(result):
|
||||||
gajim.nec.push_incoming_event(AccountNotCreated(
|
gajim.nec.push_incoming_event(AccountNotCreatedEvent(
|
||||||
None, conn=self, reason=result.getError()))
|
None, conn=self, reason=result.getError()))
|
||||||
return
|
return
|
||||||
if gajim.HAVE_GPG:
|
if gajim.HAVE_GPG:
|
||||||
|
@ -858,7 +859,8 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
# typed, so send them
|
# typed, so send them
|
||||||
if is_form:
|
if is_form:
|
||||||
#TODO: Check if form has changed
|
#TODO: Check if form has changed
|
||||||
iq = common.xmpp.Iq('set', common.xmpp.NS_REGISTER, to=self._hostname)
|
iq = common.xmpp.Iq('set', common.xmpp.NS_REGISTER,
|
||||||
|
to=self._hostname)
|
||||||
iq.setTag('query').addChild(node=self.new_account_form)
|
iq.setTag('query').addChild(node=self.new_account_form)
|
||||||
self.connection.SendAndCallForResponse(iq,
|
self.connection.SendAndCallForResponse(iq,
|
||||||
_on_register_result)
|
_on_register_result)
|
||||||
|
@ -868,7 +870,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
# requested config has changed since first connection
|
# requested config has changed since first connection
|
||||||
reason = _('Server %s provided a different '
|
reason = _('Server %s provided a different '
|
||||||
'registration form') % data[0]
|
'registration form') % data[0]
|
||||||
gajim.nec.push_incoming_event(AccountNotCreated(
|
gajim.nec.push_incoming_event(AccountNotCreatedEvent(
|
||||||
None, conn=self, reason=reason))
|
None, conn=self, reason=reason))
|
||||||
return
|
return
|
||||||
common.xmpp.features_nb.register(self.connection,
|
common.xmpp.features_nb.register(self.connection,
|
||||||
|
|
|
@ -3713,7 +3713,6 @@ class AccountCreationWizardWindow:
|
||||||
# We receive events from all accounts from GED
|
# We receive events from all accounts from GED
|
||||||
if obj.conn.name != self.account:
|
if obj.conn.name != self.account:
|
||||||
return
|
return
|
||||||
form, is_form, ssl_msg, ssl_err, ssl_cert, ssl_fingerprint = array
|
|
||||||
if self.update_progressbar_timeout_id is not None:
|
if self.update_progressbar_timeout_id is not None:
|
||||||
gobject.source_remove(self.update_progressbar_timeout_id)
|
gobject.source_remove(self.update_progressbar_timeout_id)
|
||||||
self.back_button.show()
|
self.back_button.show()
|
||||||
|
|
Loading…
Reference in New Issue