Mercurial > libervia-backend
changeset 4158:83d8d8500bc2
tools (common/data_objects): expose message's `extra` field.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 22 Nov 2023 15:11:25 +0100 |
parents | 04cdcb3fd713 |
children | 54b8cf8c8daf |
files | libervia/backend/tools/common/data_objects.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/backend/tools/common/data_objects.py Wed Nov 22 15:10:04 2023 +0100 +++ b/libervia/backend/tools/common/data_objects.py Wed Nov 22 15:11:25 2023 +0100 @@ -42,8 +42,8 @@ self._message_data = msg_data[4] self._subject_data = msg_data[5] self._type = msg_data[6] - self._extra = data_format.deserialise(msg_data[7]) - self._html = dict(data_format.get_sub_dict("xhtml", self._extra)) + self.extra = data_format.deserialise(msg_data[7]) + self._html = dict(data_format.get_sub_dict("xhtml", self.extra)) @property def id(self): @@ -77,23 +77,23 @@ @property def thread(self): - return self._extra.get("thread") + return self.extra.get("thread") @property def thread_parent(self): - return self._extra.get("thread_parent") + return self.extra.get("thread_parent") @property def received(self): - return self._extra.get("received_timestamp", self._timestamp) + return self.extra.get("received_timestamp", self._timestamp) @property def delay_sender(self): - return self._extra.get("delay_sender") + return self.extra.get("delay_sender") @property def info_type(self): - return self._extra.get("info_type") + return self.extra.get("info_type") @property def html(self): @@ -106,7 +106,7 @@ @property def attachments(self): - return self._extra.get("attachments", []) + return self.extra.get("attachments", [])