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


Commits:
29a5b49f by Philipp Hörist at 2025-03-08T13:04:16+01:00
feat: Moderation: Support Message Moderation 0.3.0

- - - - -
14eab1b2 by Philipp Hörist at 2025-03-08T13:18:15+01:00
cq: GroupChatJoin: Fix type

- - - - -


2 changed files:

- gajim/common/modules/moderations.py
- gajim/gtk/groupchat_join.py


Changes:

=====================================
gajim/common/modules/moderations.py
=====================================
@@ -44,15 +44,25 @@ def __init__(self, client: types.Client) -> None:
 
         self.handlers = [
             StanzaHandler(name='message',
-                          callback=self._process_fasten_message,
+                          callback=self._process_moderation_message,
                           typ='groupchat',
                           ns=Namespace.FASTEN,
                           priority=48),
+            StanzaHandler(name='message',
+                          callback=self._process_moderation_message,
+                          typ='groupchat',
+                          ns=Namespace.MESSAGE_RETRACT_1,
+                          priority=48),
             StanzaHandler(name='message',
                           callback=self._process_message_moderated_tombstone,
                           typ='groupchat',
                           ns=Namespace.MESSAGE_MODERATE,
                           priority=48),
+            StanzaHandler(name='message',
+                          callback=self._process_message_moderated_tombstone,
+                          typ='groupchat',
+                          ns=Namespace.MESSAGE_RETRACT_1,
+                          priority=48),
         ]
 
     def _process_message_moderated_tombstone(
@@ -89,7 +99,7 @@ def _process_message_moderated_tombstone(
 
         raise NodeProcessed
 
-    def _process_fasten_message(
+    def _process_moderation_message(
         self,
         _client: types.NBXMPPClient,
         stanza: Message,


=====================================
gajim/gtk/groupchat_join.py
=====================================
@@ -101,7 +101,7 @@ def _disco_info_received(self, task: Task) -> None:
             return
 
         if result.redirected:
-            self.jid = result.info.jid
+            self.jid = str(result.info.jid)
 
         if result.info.is_muc:
             self._muc_info_box.set_from_disco_info(result.info)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/cccd98e76611f09f3f30edadbc26aa89542f9204...14eab1b2daaa02704d9d5dfc01ad42c9dfaff002

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/cccd98e76611f09f3f30edadbc26aa89542f9204...14eab1b2daaa02704d9d5dfc01ad42c9dfaff002
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