mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-10-03 18:50:45 +00:00
Toward abstracting Pdu into trait Event.
Co-authored-by: Jade Ellis <jade@ellis.link> Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3d0360bcd6
commit
116f85360f
41 changed files with 842 additions and 886 deletions
|
@ -3,7 +3,7 @@ use std::collections::BTreeMap;
|
|||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Result, at, is_true,
|
||||
matrix::pdu::PduEvent,
|
||||
matrix::Event,
|
||||
result::FlatOk,
|
||||
utils::{IterStream, stream::ReadyExt},
|
||||
};
|
||||
|
@ -144,7 +144,7 @@ async fn category_room_events(
|
|||
.map(at!(2))
|
||||
.flatten()
|
||||
.stream()
|
||||
.map(PduEvent::into_room_event)
|
||||
.map(Event::into_format)
|
||||
.map(|result| SearchResult {
|
||||
rank: None,
|
||||
result: Some(result),
|
||||
|
@ -185,7 +185,7 @@ async fn procure_room_state(services: &Services, room_id: &RoomId) -> Result<Roo
|
|||
.rooms
|
||||
.state_accessor
|
||||
.room_state_full_pdus(room_id)
|
||||
.map_ok(PduEvent::into_state_event)
|
||||
.map_ok(Event::into_format)
|
||||
.try_collect()
|
||||
.await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue