aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0313_message_archive_management.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-24 14:19:42 +0200
committerfiaxh <git@lightrise.org>2020-04-24 14:19:42 +0200
commitf8f305efe551838c780dce4224c06bed695d8a62 (patch)
tree1e5b9f6988d0bb911a53d3234eba464873e6984b /xmpp-vala/src/module/xep/0313_message_archive_management.vala
parent1db94905ae7af1c1aed475a090dfb09e59fb2520 (diff)
downloaddino-f8f305efe551838c780dce4224c06bed695d8a62.tar.gz
dino-f8f305efe551838c780dce4224c06bed695d8a62.zip
xmpp-vala: Use more async
Diffstat (limited to 'xmpp-vala/src/module/xep/0313_message_archive_management.vala')
-rw-r--r--xmpp-vala/src/module/xep/0313_message_archive_management.vala19
1 files changed, 2 insertions, 17 deletions
diff --git a/xmpp-vala/src/module/xep/0313_message_archive_management.vala b/xmpp-vala/src/module/xep/0313_message_archive_management.vala
index bba52702..dfb3bb7a 100644
--- a/xmpp-vala/src/module/xep/0313_message_archive_management.vala
+++ b/xmpp-vala/src/module/xep/0313_message_archive_management.vala
@@ -56,18 +56,10 @@ public class Module : XmppStreamModule {
if (stream.get_flag(Flag.IDENTITY) == null) return null;
var query_node = crate_base_query(stream, jid, query_id, start_time, end_time);
-
query_node.put_node(create_set_rsm_node(end_id));
Iq.Stanza iq = new Iq.Stanza.set(query_node);
- Iq.Stanza? result_iq = null;
- stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, (stream, iq) => {
- result_iq = iq;
- Idle.add(query_archive.callback);
- });
- yield;
-
- return result_iq;
+ return yield stream.get_module(Iq.Module.IDENTITY).send_iq_async(stream, iq);
}
public override void attach(XmppStream stream) {
@@ -98,14 +90,7 @@ public class Module : XmppStreamModule {
Iq.Stanza paging_iq = new Iq.Stanza.set(query_node);
- Iq.Stanza? result_iq = null;
- stream.get_module(Iq.Module.IDENTITY).send_iq(stream, paging_iq, (stream, iq) => {
- result_iq = iq;
- Idle.add(page_through_results.callback);
- });
- yield;
-
- return result_iq;
+ return yield stream.get_module(Iq.Module.IDENTITY).send_iq_async(stream, paging_iq);
}
private async void query_availability(XmppStream stream) {