diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2024-04-29 15:22:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-29 15:22:13 +0100 |
commit | b548f7803a9b7ba51a66d47ddb9bb69dce541a48 (patch) | |
tree | edf0a111f84a08464c6551c4d75e3667fa13c60b /rust | |
parent | Update tornado 6.2 -> 6.4 (#17131) (diff) | |
download | synapse-b548f7803a9b7ba51a66d47ddb9bb69dce541a48.tar.xz |
Add support for MSC4115 (#17104)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'rust')
-rw-r--r-- | rust/src/events/internal_metadata.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rust/src/events/internal_metadata.rs b/rust/src/events/internal_metadata.rs index a53601862d..53c7b1ba61 100644 --- a/rust/src/events/internal_metadata.rs +++ b/rust/src/events/internal_metadata.rs @@ -20,8 +20,10 @@ //! Implements the internal metadata class attached to events. //! -//! The internal metadata is a bit like a `TypedDict`, in that it is stored as a -//! JSON dict in the DB. Most events have zero, or only a few, of these keys +//! The internal metadata is a bit like a `TypedDict`, in that most of +//! it is stored as a JSON dict in the DB (the exceptions being `outlier` +//! and `stream_ordering` which have their own columns in the database). +//! Most events have zero, or only a few, of these keys //! set. Therefore, since we care more about memory size than performance here, //! we store these fields in a mapping. //! @@ -234,6 +236,9 @@ impl EventInternalMetadata { self.clone() } + /// Get a dict holding the data stored in the `internal_metadata` column in the database. + /// + /// Note that `outlier` and `stream_ordering` are stored in separate columns so are not returned here. fn get_dict(&self, py: Python<'_>) -> PyResult<PyObject> { let dict = PyDict::new(py); |