aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/util.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-08-22 16:05:28 +0200
committerfiaxh <git@lightrise.org>2019-08-22 16:05:28 +0200
commit130965f322ea58d3d2bbce5ee6ac31dae2d3a659 (patch)
tree1ece66670d82eac674ee82ebe84a7ca487047d69 /xmpp-vala/src/module/util.vala
parent0521afa3d828ea0dfc79e6c5c76697e2a3a270c0 (diff)
downloaddino-130965f322ea58d3d2bbce5ee6ac31dae2d3a659.tar.gz
dino-130965f322ea58d3d2bbce5ee6ac31dae2d3a659.zip
Add incoming mediated invitation support (#162)
Co-authored-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Diffstat (limited to 'xmpp-vala/src/module/util.vala')
-rw-r--r--xmpp-vala/src/module/util.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/util.vala b/xmpp-vala/src/module/util.vala
index cb11418c..28f1a5f8 100644
--- a/xmpp-vala/src/module/util.vala
+++ b/xmpp-vala/src/module/util.vala
@@ -19,7 +19,7 @@ public abstract class StanzaListener<T> : OrderedListener {
public class StanzaListenerHolder<T> : ListenerHolder {
- public async void run(XmppStream stream, T stanza) {
+ public async bool run(XmppStream stream, T stanza) {
// listeners can change e.g. when switching to another stream
ArrayList<OrderedListener> listeners_copy = new ArrayList<OrderedListener>();
@@ -28,8 +28,9 @@ public class StanzaListenerHolder<T> : ListenerHolder {
foreach (OrderedListener ol in listeners_copy) {
StanzaListener<T> l = ol as StanzaListener<T>;
bool stop = yield l.run(stream, stanza);
- if (stop) break;
+ if (stop) return true;
}
+ return false;
}
}