Philipp Hörist pushed to branch master at gajim / gajim


Commits:
4d39e942 by Philipp Hörist at 2025-11-09T17:54:22+01:00
fix: Chatstates: Use group chat setting for PM chats

- - - - -


1 changed file:

- gajim/common/modules/chatstates.py


Changes:

=====================================
gajim/common/modules/chatstates.py
=====================================
@@ -360,6 +360,12 @@ def set_chatstate_delayed(self, contact: 
types.ChatContactT, state: State) -> No
             2, self.set_chatstate, contact, state
         )
 
+    @staticmethod
+    def _get_chatstate_setting(contact: types.ChatContactT) -> str:
+        if isinstance(contact, GroupchatParticipant):
+            return contact.room.settings.get('send_chatstate')
+        return contact.settings.get('send_chatstate')
+
     @ensure_enabled
     def set_chatstate(self, contact: types.ChatContactT, state: State) -> None:
         # Don’t send chatstates to ourself
@@ -371,7 +377,7 @@ def set_chatstate(self, contact: types.ChatContactT, state: 
State) -> None:
 
         self._remove_delay_timeout(contact)
         current_state = self._chatstates.get(contact.jid)
-        setting = contact.settings.get('send_chatstate')
+        setting = self._get_chatstate_setting(contact)
         if setting == 'disabled':
             # Send a last 'active' state after user disabled chatstates
             if current_state is not None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4d39e942271c704b0274a19fcb77c3a6e384a245

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4d39e942271c704b0274a19fcb77c3a6e384a245
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