diff options
author | fiaxh <git@lightrise.org> | 2024-09-16 22:47:49 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2024-09-21 17:06:20 +0100 |
commit | f8c004630f56914438fa1b114530f639748e41c1 (patch) | |
tree | 4a9d2ae1de436c00e9d1ac75e05426291be52c4b /libdino/src/service/registration.vala | |
parent | b09556f03349b51d95c14d1046add355a4754e01 (diff) | |
download | dino-f8c004630f56914438fa1b114530f639748e41c1.tar.gz dino-f8c004630f56914438fa1b114530f639748e41c1.zip |
Add change password functionality
Co-authored-by: Stanislav Malishevskiy <stanislav.malishevskiy@gmail.com>
Diffstat (limited to 'libdino/src/service/registration.vala')
-rw-r--r-- | libdino/src/service/registration.vala | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |