diff libervia/backend/tools/common/data_objects.py @ 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 f8284f994948
children b274f0d5c138
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):