mirror of
https://github.com/element-hq/synapse.git
synced 2026-04-26 21:45:34 +00:00
WIP
This commit is contained in:
+15
-7
@@ -393,6 +393,21 @@ impl Event {
|
||||
})
|
||||
}
|
||||
|
||||
fn get_dict<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
|
||||
match &self.inner {
|
||||
EventFormatEnum::V3(format) => Ok(pythonize(py, format)?),
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
fn get_pdu_json<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
|
||||
// We need to do a bunch of changes here.
|
||||
match &self.inner {
|
||||
EventFormatEnum::V3(format) => Ok(pythonize(py, format)?),
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn room_id(&self) -> Option<&str> {
|
||||
match &self.inner {
|
||||
@@ -409,13 +424,6 @@ impl Event {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_pdu_json<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
|
||||
match &self.inner {
|
||||
EventFormatEnum::V3(format) => Ok(pythonize(py, format)?),
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn content(&self) -> PyResult<JsonObject> {
|
||||
match &self.inner {
|
||||
|
||||
Reference in New Issue
Block a user