From 921f28c84bbda56ec93df7dcde7c828eaabb0b58 Mon Sep 17 00:00:00 2001
From: Marvin W <git@larma.de>
Date: Tue, 31 Jan 2023 14:43:17 +0100
Subject: Fix reaction display in private MUCs

---
 xmpp-vala/src/module/xep/0045_muc/flag.vala | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'xmpp-vala/src/module/xep')

diff --git a/xmpp-vala/src/module/xep/0045_muc/flag.vala b/xmpp-vala/src/module/xep/0045_muc/flag.vala
index 976291b8..d0d2c359 100644
--- a/xmpp-vala/src/module/xep/0045_muc/flag.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/flag.vala
@@ -26,6 +26,15 @@ public class Flag : XmppStreamFlag {
 
     public Jid? get_real_jid(Jid full_jid) { return occupant_real_jids[full_jid]; }
 
+    public Jid? get_occupant_jid(Jid real_jid, Jid room) {
+        foreach (Map.Entry<Jid, Jid> entry in occupant_real_jids) {
+            if (entry.value.equals_bare(real_jid) && entry.key.equals_bare(room)) {
+                return entry.key;
+            }
+        }
+        return null;
+    }
+
     public Gee.List<Jid> get_offline_members(Jid muc_jid) {
         Gee.List<Jid> ret = new ArrayList<Jid>(Jid.equals_func);
         HashMap<Jid, Affiliation>? muc_affiliations = affiliations[muc_jid.bare_jid];
-- 
cgit v1.2.3-70-g09d2