From c70201080b9bf432b9b7be2a88fd3cb6efa781b8 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 4 Jan 2022 20:06:43 +0100 Subject: Create a new list to return in Presence.Flag.get_resources --- xmpp-vala/src/module/presence/flag.vala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmpp-vala/src/module/presence/flag.vala b/xmpp-vala/src/module/presence/flag.vala index 8e13d0ad..cc0a1f6b 100644 --- a/xmpp-vala/src/module/presence/flag.vala +++ b/xmpp-vala/src/module/presence/flag.vala @@ -13,6 +13,9 @@ public class Flag : XmppStreamFlag { } public Gee.List? get_resources(Jid jid) { + if (!resources.has_key(jid)) return null; + ArrayList ret = new ArrayList(); + ret.add_all(resources[jid]); return resources[jid]; } -- cgit v1.2.3-70-g09d2