From 8e2a459eaeb805348c3252ada3bdc6b250e4694c Mon Sep 17 00:00:00 2001 From: Stanislav Malishevskiy Date: Tue, 26 Mar 2024 15:32:31 +0300 Subject: [PATCH] Save password after succes change --- main/src/ui/manage_accounts/change_password_dialog.vala | 4 +++- xmpp-vala/src/module/xep/0077_in_band_registration.vala | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main/src/ui/manage_accounts/change_password_dialog.vala b/main/src/ui/manage_accounts/change_password_dialog.vala index 12b5f826..126a174a 100644 --- a/main/src/ui/manage_accounts/change_password_dialog.vala +++ b/main/src/ui/manage_accounts/change_password_dialog.vala @@ -87,8 +87,10 @@ namespace Dino.Ui{ string ret = yield stream_interactor.get_module(Register.IDENTITY).change_password(account, new_pw_input); change_password_button.sensitive = true; change_password_stack.visible_child_name = "label"; - if (ret == null) + if (ret == null) { + account.password = new_pw_input; close(); + } change_password_error_label.label = ret; diff --git a/xmpp-vala/src/module/xep/0077_in_band_registration.vala b/xmpp-vala/src/module/xep/0077_in_band_registration.vala index ecb25334..f54d4e3c 100644 --- a/xmpp-vala/src/module/xep/0077_in_band_registration.vala +++ b/xmpp-vala/src/module/xep/0077_in_band_registration.vala @@ -38,7 +38,7 @@ public class Module : XmppStreamNegotiationModule { pw_node.put_node(new StanzaNode.text(new_pw)); pw_change_node.put_node(username_node); pw_change_node.put_node(pw_node); - Iq.Stanza set_password_iq = new Iq.Stanza.set(pw_change_node, "change1") { to=jid.bare_jid.domain_jid }; + Iq.Stanza set_password_iq = new Iq.Stanza.set(pw_change_node) { to=jid.bare_jid.domain_jid }; Iq.Stanza chpw_result = yield stream.get_module(Iq.Module.IDENTITY).send_iq_async(stream, set_password_iq); if (chpw_result.is_error()) {