Skip to content

Commit 7d5dc63

Browse files
committed
Add changelog
1 parent fc56cf9 commit 7d5dc63

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

changelog.d/19837.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Port the synchronous core of client event serialization to Rust.

rust/src/events/relations.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,14 @@ use crate::events::{json_object::JsonObject, Event};
2929

3030
/// A thread's bundled summary: its latest event, the number of events in the
3131
/// thread, and whether the requesting user has participated.
32-
#[pyclass(frozen, name = "ThreadAggregation", skip_from_py_object)]
32+
#[pyclass(frozen, skip_from_py_object, get_all)]
3333
#[derive(Clone)]
3434
pub struct ThreadAggregation {
3535
/// The latest event in the thread.
36-
#[pyo3(get)]
3736
pub latest_event: Event,
3837
/// The total number of events in the thread.
39-
#[pyo3(get)]
4038
pub count: i64,
4139
/// Whether the requesting user has sent an event to the thread.
42-
#[pyo3(get)]
4340
pub current_user_participated: bool,
4441
}
4542

@@ -59,17 +56,14 @@ impl ThreadAggregation {
5956
///
6057
/// Some values require additional processing during serialization (the edit
6158
/// and the thread's latest event are themselves serialized).
62-
#[pyclass(frozen, skip_from_py_object)]
59+
#[pyclass(frozen, skip_from_py_object, get_all)]
6360
#[derive(Clone)]
6461
pub struct BundledAggregations {
6562
/// The `m.reference` aggregation (e.g. `{"chunk": [{"event_id": ...}]}`).
66-
#[pyo3(get)]
6763
pub references: Option<JsonObject>,
6864
/// The edit (`m.replace`) event that applies to this event.
69-
#[pyo3(get)]
7065
pub replace: Option<Event>,
7166
/// The thread (`m.thread`) summary for this event.
72-
#[pyo3(get)]
7367
pub thread: Option<ThreadAggregation>,
7468
}
7569

0 commit comments

Comments
 (0)