Daniel Brötzmann pushed to branch reactions at gajim / gajim


Commits:
0d424f0c by wurstsalat at 2024-05-18T20:25:58+02:00
fix: ReactionsBar: Fix returning empty reactions in get_our_reactions

- - - - -
cc5073ed by wurstsalat at 2024-05-18T20:29:35+02:00
cfix: Reactions: Hide reactions only if MUC is public and doesn't support 
occupant IDs

- - - - -


2 changed files:

- gajim/gtk/conversation/reactions_bar.py
- gajim/gtk/conversation/rows/widgets.py


Changes:

=====================================
gajim/gtk/conversation/reactions_bar.py
=====================================
@@ -85,7 +85,9 @@ def get_our_reactions(self) -> set[str]:
         our_reactions: set[str] = set()
         for reaction in self._reactions:
             if reaction.direction == ChatDirection.OUTGOING:
-                our_reactions = set(reaction.emojis.split(';'))
+                our_reactions = {
+                    emoji for emoji in reaction.emojis.split(';') if emoji
+                }
                 break
 
         return our_reactions


=====================================
gajim/gtk/conversation/rows/widgets.py
=====================================
@@ -145,8 +145,10 @@ def _get_reply_visible(self) -> bool:
         return True
 
     def _get_reactions_visible(self) -> bool:
-        if isinstance(self._contact, GroupchatContact):
+        if (isinstance(self._contact, GroupchatContact) and
+                self._contact.muc_context == 'public'):
             return self._contact.supports(Namespace.OCCUPANT_ID)
+
         return True
 
     def _hide(self) -> None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/3add1998acbb49be9b99bbc6ccfa3c1639cd1a62...cc5073ed2e905c40c3f74cef4afa7adcb1c940be

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/3add1998acbb49be9b99bbc6ccfa3c1639cd1a62...cc5073ed2e905c40c3f74cef4afa7adcb1c940be
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to