Toward abstracting Pdu into trait Event.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-04-26 08:24:47 +00:00
parent 28354db9df
commit 57c519bbb8
41 changed files with 831 additions and 874 deletions

View File

@@ -161,7 +161,7 @@ pub(crate) async fn get_message_events_route(
let chunk = events
.into_iter()
.map(at!(1))
.map(PduEvent::into_room_event)
.map(Event::into_format)
.collect();
Ok(get_message_events::v3::Response {
@@ -227,7 +227,7 @@ async fn get_member_event(
.rooms
.state_accessor
.room_state_get(room_id, &StateEventType::RoomMember, user_id.as_str())
.map_ok(PduEvent::into_state_event)
.map_ok(Event::into_format)
.await
.ok()
}