Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-06-08 01:01:26 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-06-08 01:27:22 +0300
commitb1648d62b6884136e045ea7fcc63d84fda967c87 (patch)
treeb06cd9e210b605eac2dae93b2d3142eded10f252
parent0df81b02da2cf6610909f6894ef756d8b6fae557 (diff)
fix: SecurityLabels: Display labels for messages received with MAM
-rw-r--r--gajim/common/events.py1
-rw-r--r--gajim/common/modules/mam.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/gajim/common/events.py b/gajim/common/events.py
index 59ea378af..fe9c70196 100644
--- a/gajim/common/events.py
+++ b/gajim/common/events.py
@@ -400,6 +400,7 @@ class MamMessageReceived(ApplicationEvent):
kind: KindConstant
occupant_id: str | None
real_jid: JID | None
+ displaymarking: Displaymarking | None
@dataclass
diff --git a/gajim/common/modules/mam.py b/gajim/common/modules/mam.py
index acd8e3710..b50cfe322 100644
--- a/gajim/common/modules/mam.py
+++ b/gajim/common/modules/mam.py
@@ -302,6 +302,10 @@ class MAM(BaseModule):
occupant_id = self._get_occupant_id(properties)
real_jid = self._get_real_jid(properties)
+ displaymarking = None
+ if properties.has_security_label:
+ displaymarking = properties.security_label.displaymarking
+
event_attr: dict[str, Any] = {
'account': self._account,
'jid': jid,
@@ -314,6 +318,7 @@ class MAM(BaseModule):
'kind': kind,
'occupant_id': occupant_id,
'real_jid': real_jid,
+ 'displaymarking': displaymarking
}
if check_if_message_correction(properties,