Philipp Hörist pushed to branch reactions at gajim / gajim
Commits:
2a58090f by Philipp Hörist at 2024-05-11T11:19:38+02:00
cfix: Make it work in Groupchat
- - - - -
1 changed file:
- gajim/common/modules/reactions.py
Changes:
=====================================
gajim/common/modules/reactions.py
=====================================
@@ -79,9 +79,9 @@ def _process_reaction(
occupant = None
if m_type == MessageType.GROUPCHAT:
contact = self._client.get_module('Contacts').get_contact(
- remote_jid, groupchat=True)
+ properties.jid, groupchat=True)
- assert contact is GroupchatParticipant
+ assert isinstance(contact, GroupchatParticipant)
occupant = get_occupant_info(
account=self._account,
remote_jid=remote_jid,
@@ -92,6 +92,10 @@ def _process_reaction(
properties=properties,
)
+ if occupant is None:
+ self._log.info('Reactions not supported without occupant-id')
+ raise NodeProcessed
+
reaction = mod.Reaction(
account_=self._account,
remote_jid_=remote_jid,
@@ -112,6 +116,8 @@ def _process_reaction(
)
)
+ raise NodeProcessed
+
def send_reaction(
self,
contact: types.ChatContactT,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/2a58090fb31a58022df5ce9f1db627d518f6627a
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/2a58090fb31a58022df5ce9f1db627d518f6627a
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]