Philipp Hörist pushed to branch master at gajim / gajim
Commits: 119590f4 by Philipp Hörist at 2022-12-22T22:19:37+01:00 fix: AccountWizard: Remove subscriptions after successfull login
Calling _disconnect() removes all subscriptions and cleans up the client.
Fixes #11342
- - - - -
1 changed file:
- gajim/gtk/account_wizard.py
Changes:
===================================== gajim/gtk/account_wizard.py ===================================== @@ -381,6 +381,7 @@ def _on_login_successful(self, client: Client, _signal_name: str) -> None: client.custom_host) self.get_page('success').set_account(account) self.show_page('success', Gtk.StackTransitionType.SLIDE_LEFT) + self._disconnect()
def _on_connected(self, client: Client, _signal_name: str) -> None: client.get_module('Register').request_register_form( @@ -402,8 +403,10 @@ def _on_anonymous_supported(self, proxy_name, client.custom_host, anonymous=True) + self.get_page('success').set_account(account) self.show_page('success', Gtk.StackTransitionType.SLIDE_LEFT) + self._disconnect()
def _on_disconnected(self, client: Client, _signal_name: str) -> None: domain, error, text = client.get_error() @@ -430,15 +433,6 @@ def _on_disconnected(self, client: Client, _signal_name: str) -> None: _('Signup not allowed'), _('This server does not allow signup.'))
- elif domain == StreamError.STREAM: - # The credential test often ends with a stream error, because - # after auth there should be a stream restart but nbxmpp ends - # the stream with </stream> which is considered not-well-formed - # by the server. This ignores all stream errors if we already - # know that we succeeded. - if self.get_current_page() != 'success': - self._show_error_page(_('Error'), _('Error'), text or error) - else: self._show_error_page(_('Error'), _('Error'), text or error)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/119590f4dbcf8e0db0df624e8d98c4aac...