Philipp Hörist pushed to branch master at gajim / gajim
Commits:
66f6ed7f by Philipp Hörist at 2024-07-23T21:43:10+02:00
fix: Messages: Treat type=normal messages as chat messages
- - - - -
2 changed files:
- gajim/common/modules/message.py
- gajim/common/modules/message_util.py
Changes:
=====================================
gajim/common/modules/message.py
=====================================
@@ -89,9 +89,10 @@ def _message_received(self,
properties: MessageProperties
) -> None:
- if (properties.is_pubsub or
- properties.type.is_error or
- properties.type.is_normal):
+ if properties.is_pubsub or properties.type.is_error:
+ return
+
+ if properties.type.is_normal and not properties.body:
return
# Check if a child of the message contains any
=====================================
gajim/common/modules/message_util.py
=====================================
@@ -55,9 +55,6 @@ def get_chat_type_and_direction(
if properties.is_muc_pm:
return MessageType.PM, direction
- if not properties.type.is_chat:
- raise ValueError('Invalid message type', properties.type)
-
return MessageType.CHAT, direction
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/66f6ed7ff47e7121f5d25a1f2b9717b922f2400c
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/66f6ed7ff47e7121f5d25a1f2b9717b922f2400c
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]