Skip to content
Snippets Groups Projects
Verified Commit b1648d62 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

fix: SecurityLabels: Display labels for messages received with MAM

parent 0df81b02
No related branches found
No related tags found
No related merge requests found
......@@ -400,6 +400,7 @@ class MamMessageReceived(ApplicationEvent):
kind: KindConstant
occupant_id: str | None
real_jid: JID | None
displaymarking: Displaymarking | None
@dataclass
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment