changeset 4099:11e802089b19

tools (common/data_objects): add `attachments` in Message
author Goffi <goffi@goffi.org>
date Thu, 22 Jun 2023 15:47:17 +0200
parents 4a8b29ab34c0
children 810921c33a47
files libervia/backend/tools/common/data_objects.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/backend/tools/common/data_objects.py	Thu Jun 22 15:46:42 2023 +0200
+++ b/libervia/backend/tools/common/data_objects.py	Thu Jun 22 15:47:17 2023 +0200
@@ -104,6 +104,11 @@
         except KeyError:
             return safe(next(iter(self._html.values())))
 
+    @property
+    def attachments(self):
+        return self._extra.get("attachments", [])
+
+
 
 class Messages(object):
     def __init__(self, msgs_data):