From f8c004630f56914438fa1b114530f639748e41c1 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 16 Sep 2024 22:47:49 +0200 Subject: Add change password functionality Co-authored-by: Stanislav Malishevskiy --- libdino/src/service/registration.vala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdino/src/service/registration.vala') diff --git a/libdino/src/service/registration.vala b/libdino/src/service/registration.vala index 4255f322..8a8e75b1 100644 --- a/libdino/src/service/registration.vala +++ b/libdino/src/service/registration.vala @@ -71,6 +71,12 @@ public class Register : StreamInteractionModule, Object{ return ret; } + public async string? change_password(Account account, string new_pw){ + XmppStream stream = stream_interactor.get_stream(account); + if (stream == null) return null; + return (yield stream.get_module(Xep.InBandRegistration.Module.IDENTITY).change_password(stream, account.full_jid, new_pw)).condition; + } + public class ServerAvailabilityReturn { public bool available { get; set; } public TlsCertificateFlags? error_flags { get; set; } -- cgit v1.2.3-70-g09d2