Save password after succes change

This commit is contained in:
Stanislav Malishevskiy 2024-03-26 15:32:31 +03:00 committed by Maxim Logaev
parent 06496b9720
commit 8e2a459eae
2 changed files with 4 additions and 2 deletions

View file

@ -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;

View file

@ -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()) {