From 890b91ce4d968f838b46686295883500eba55c78 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 16 Dec 2019 01:34:28 +0100 Subject: Only send new room config if something was changed fixes #675 --- libdino/src/service/muc_manager.vala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libdino/src') diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index fa76ddd5..01185731 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -62,13 +62,16 @@ public class MucManager : StreamInteractionModule, Object { if (conversation != null) stream_interactor.get_module(ConversationManager.IDENTITY).close_conversation(conversation); } - public delegate void OnResult(Jid jid, Xep.DataForms.DataForm data_form); - public void get_config_form(Account account, Jid jid, owned OnResult listener) { + public async DataForms.DataForm? get_config_form(Account account, Jid jid) { + XmppStream? stream = stream_interactor.get_stream(account); + if (stream == null) return null; + return yield stream.get_module(Xep.Muc.Module.IDENTITY).get_config_form(stream, jid); + } + + public void set_config_form(Account account, Jid jid, DataForms.DataForm data_form) { XmppStream? stream = stream_interactor.get_stream(account); if (stream == null) return; - stream.get_module(Xep.Muc.Module.IDENTITY).get_config_form(stream, jid, (stream, jid, data_form) => { - listener(jid, data_form); - }); + stream.get_module(Xep.Muc.Module.IDENTITY).set_config_form(stream, jid, data_form); } public void change_subject(Account account, Jid jid, string subject) { -- cgit v1.2.3-70-g09d2