aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/presence
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-11-04 17:33:08 +0100
committerfiaxh <git@lightrise.org>2021-11-10 11:05:34 +0100
commit26d10d1dcb95f11b65611473c9840e13683cb5ec (patch)
treefb09e36aba28ff1b971ea11ad3da2dd3d92f31d4 /xmpp-vala/src/module/presence
parent38944d702331bb9d7a91d8ed05a33c935562e3c0 (diff)
downloaddino-26d10d1dcb95f11b65611473c9840e13683cb5ec.tar.gz
dino-26d10d1dcb95f11b65611473c9840e13683cb5ec.zip
Add multiparty call support to libdino and xmpp-vala
Diffstat (limited to 'xmpp-vala/src/module/presence')
-rw-r--r--xmpp-vala/src/module/presence/flag.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/presence/flag.vala b/xmpp-vala/src/module/presence/flag.vala
index 77bc0b5f..8e13d0ad 100644
--- a/xmpp-vala/src/module/presence/flag.vala
+++ b/xmpp-vala/src/module/presence/flag.vala
@@ -20,6 +20,17 @@ public class Flag : XmppStreamFlag {
return presences[full_jid];
}
+ public Gee.List<Presence.Stanza> get_presences(Jid jid) {
+ Gee.List<Presence.Stanza> ret = new ArrayList<Presence.Stanza>();
+ Gee.List<Jid>? jid_res = resources[jid];
+ if (jid_res == null) return ret;
+
+ foreach (Jid full_jid in jid_res) {
+ ret.add(presences[full_jid]);
+ }
+ return ret;
+ }
+
public void add_presence(Presence.Stanza presence) {
if (!resources.has_key(presence.from)) {
resources[presence.from] = new ArrayList<Jid>(Jid.equals_func);