aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/message
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-03-05 12:21:43 +0100
committerfiaxh <git@lightrise.org>2020-03-05 12:21:43 +0100
commit013b388896315c7ac10e6cd7d36f913559998f83 (patch)
tree3d2ca3a52c81c0c981bb38fd0b756dab6000b7b6 /xmpp-vala/src/module/message
parentb8b3e1c6f517a18a917250f17a64ba1bd19140a8 (diff)
downloaddino-013b388896315c7ac10e6cd7d36f913559998f83.tar.gz
dino-013b388896315c7ac10e6cd7d36f913559998f83.zip
Make message sending async and set unsent on error
Diffstat (limited to 'xmpp-vala/src/module/message')
-rw-r--r--xmpp-vala/src/module/message/module.vala7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmpp-vala/src/module/message/module.vala b/xmpp-vala/src/module/message/module.vala
index 5ddbbe1a..5f7d40f0 100644
--- a/xmpp-vala/src/module/message/module.vala
+++ b/xmpp-vala/src/module/message/module.vala
@@ -14,10 +14,9 @@ namespace Xmpp {
public signal void received_message(XmppStream stream, MessageStanza message);
public signal void received_message_unprocessed(XmppStream stream, MessageStanza message);
- public void send_message(XmppStream stream, MessageStanza message) {
- send_pipeline.run.begin(stream, message, (obj, res) => {
- stream.write(message.stanza);
- });
+ public async void send_message(XmppStream stream, MessageStanza message) throws IOStreamError {
+ yield send_pipeline.run(stream, message);
+ yield stream.write_async(message.stanza);
}
public async void received_message_stanza_async(XmppStream stream, StanzaNode node) {