diff options
author | fiaxh <git@lightrise.org> | 2021-12-23 00:44:51 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-12-23 00:46:58 +0100 |
commit | d02c5bc55d4325de308a592e8980139aa0634215 (patch) | |
tree | 9cb91f86056dd29f863bd8e54580cccc625af60e /xmpp-vala/src/module/presence/flag.vala | |
parent | 1378224444b1862ac95783ac2bae7d25a0a8862d (diff) | |
parent | f0c7dd0682fec8d72c644d8e54896de7bdc40ddb (diff) | |
download | dino-d02c5bc55d4325de308a592e8980139aa0634215.tar.gz dino-d02c5bc55d4325de308a592e8980139aa0634215.zip |
Merge branch groupcalls
Diffstat (limited to 'xmpp-vala/src/module/presence/flag.vala')
-rw-r--r-- | xmpp-vala/src/module/presence/flag.vala | 11 |
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); |