| ... |
... |
@@ -381,6 +381,7 @@ def _on_login_successful(self, client: Client, _signal_name: str) -> None: |
|
381
|
381
|
client.custom_host)
|
|
382
|
382
|
self.get_page('success').set_account(account)
|
|
383
|
383
|
self.show_page('success', Gtk.StackTransitionType.SLIDE_LEFT)
|
|
|
384
|
+ self._disconnect()
|
|
384
|
385
|
|
|
385
|
386
|
def _on_connected(self, client: Client, _signal_name: str) -> None:
|
|
386
|
387
|
client.get_module('Register').request_register_form(
|
| ... |
... |
@@ -402,8 +403,10 @@ def _on_anonymous_supported(self, |
|
402
|
403
|
proxy_name,
|
|
403
|
404
|
client.custom_host,
|
|
404
|
405
|
anonymous=True)
|
|
|
406
|
+
|
|
405
|
407
|
self.get_page('success').set_account(account)
|
|
406
|
408
|
self.show_page('success', Gtk.StackTransitionType.SLIDE_LEFT)
|
|
|
409
|
+ self._disconnect()
|
|
407
|
410
|
|
|
408
|
411
|
def _on_disconnected(self, client: Client, _signal_name: str) -> None:
|
|
409
|
412
|
domain, error, text = client.get_error()
|
| ... |
... |
@@ -430,15 +433,6 @@ def _on_disconnected(self, client: Client, _signal_name: str) -> None: |
|
430
|
433
|
_('Signup not allowed'),
|
|
431
|
434
|
_('This server does not allow signup.'))
|
|
432
|
435
|
|
|
433
|
|
- elif domain == StreamError.STREAM:
|
|
434
|
|
- # The credential test often ends with a stream error, because
|
|
435
|
|
- # after auth there should be a stream restart but nbxmpp ends
|
|
436
|
|
- # the stream with </stream> which is considered not-well-formed
|
|
437
|
|
- # by the server. This ignores all stream errors if we already
|
|
438
|
|
- # know that we succeeded.
|
|
439
|
|
- if self.get_current_page() != 'success':
|
|
440
|
|
- self._show_error_page(_('Error'), _('Error'), text or error)
|
|
441
|
|
-
|
|
442
|
436
|
else:
|
|
443
|
437
|
self._show_error_page(_('Error'), _('Error'), text or error)
|
|
444
|
438
|
|