diff options
author | fiaxh <git@lightrise.org> | 2019-12-16 01:34:28 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-12-16 01:41:04 +0100 |
commit | 890b91ce4d968f838b46686295883500eba55c78 (patch) | |
tree | 62983c8fb2fe49e0cbab66cef944121e1f074ef3 /libdino/src | |
parent | 21c01dcdcb3ba7f7d5c6fcd18c5fd2117f050e5e (diff) | |
download | dino-890b91ce4d968f838b46686295883500eba55c78.tar.gz dino-890b91ce4d968f838b46686295883500eba55c78.zip |
Only send new room config if something was changed
fixes #675
Diffstat (limited to 'libdino/src')
-rw-r--r-- | libdino/src/service/muc_manager.vala | 13 |
1 files changed, 8 insertions, 5 deletions
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) { |