Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
8214a92c by wurstsalat at 2025-02-17T20:11:01+01:00
cfix: Modules: Fix assertions
- - - - -
3 changed files:
- gajim/common/modules/chatstates.py
- gajim/common/modules/message.py
- gajim/common/modules/moderations.py
Changes:
=====================================
gajim/common/modules/chatstates.py
=====================================
@@ -160,11 +160,10 @@ def _process_chatstate(
if properties.chatstate is None:
return
- assert properties.carbon is not None
if (
properties.is_self_message
or properties.is_mam_message
- or (properties.is_carbon_message
+ or (properties.carbon is not None
and properties.carbon.is_sent)
):
return self._raise_if_necessary(properties)
=====================================
gajim/common/modules/message.py
=====================================
@@ -211,8 +211,7 @@ def _message_received(self,
return
securitylabel_data = None
- if properties.has_security_label:
- assert properties.security_label is not None
+ if properties.security_label is not None:
displaymarking = properties.security_label.displaymarking
if displaymarking is not None:
securitylabel_data = mod.SecurityLabel(
=====================================
gajim/common/modules/moderations.py
=====================================
@@ -99,8 +99,6 @@ def _process_fasten_message(
if not properties.is_moderation:
return
- assert properties.moderation is not None
-
is_occupant_id_supported = self._is_occupant_id_supported(properties)
self._insert_moderation_message(properties, is_occupant_id_supported)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8214a92c7ce24cb2fa36cbdf0254a30083fe2bd7
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8214a92c7ce24cb2fa36cbdf0254a30083fe2bd7
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]