Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
49bb355b by wurstsalat at 2025-03-02T23:03:37+01:00
cq: ChatMarkers: Improve type annotations
- - - - -
2 changed files:
- gajim/common/events.py
- gajim/common/modules/chat_markers.py
Changes:
=====================================
gajim/common/events.py
=====================================
@@ -17,6 +17,7 @@
from nbxmpp.const import Affiliation
from nbxmpp.const import InviteType
+from nbxmpp.const import MessageType as NBXMPPMessageType
from nbxmpp.const import Role
from nbxmpp.const import StatusCode
from nbxmpp.modules.security_labels import Catalog
@@ -314,7 +315,7 @@ class DisplayedReceived(ApplicationEvent):
account: str
jid: JID
properties: Any
- type: str
+ type: NBXMPPMessageType
is_muc_pm: bool
marker_id: str
=====================================
gajim/common/modules/chat_markers.py
=====================================
@@ -93,14 +93,17 @@ def _raise_read_state_sync(self, jid: JID, marker_id: str)
-> None:
jid=jid,
marker_id=marker_id))
- def _raise_event(self, name: str, properties: Any) -> None:
+ def _raise_event(self, name: str, properties: MessageProperties) -> None:
+ assert properties.marker is not None
+ assert properties.remote_jid is not None
+
self._log.info('%s: %s %s',
name,
properties.jid,
properties.marker.id)
if not properties.is_muc_pm and not properties.type.is_groupchat:
- if properties.is_mam_message:
+ if properties.mam is not None:
timestamp = properties.mam.timestamp
else:
timestamp = properties.timestamp
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/49bb355b87c915dc464b7b4bd0ffaea091e69852
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/49bb355b87c915dc464b7b4bd0ffaea091e69852
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]