Skip to main content Module context Copy item path Source use axum::extract::State; π use futures::FutureExt; π use futures::Stream; π use futures::StreamExt; π use futures::TryFutureExt; π use futures::TryStreamExt; π use futures::future::OptionFuture; π use futures::future::join; π use futures::future::join3; π use futures::future::try_join; π use ruma::DeviceId; π use ruma::EventId; π use ruma::OwnedEventId; π use ruma::RoomId; π use ruma::UInt; π use ruma::UserId; π use ruma::api::client::context::get_context; π use ruma::api::client::filter::RoomEventFilter; π use ruma::events::AnyStateEvent; π use ruma::events::StateEventType; π use ruma::serde::Raw; π use tuwunel_core::Err ; π use tuwunel_core::Result ; π use tuwunel_core::at ; π use tuwunel_core::debug_warn ; π use tuwunel_core::err ; π use tuwunel_core::ref_at ; π use tuwunel_core::utils::BoolExt ; π use tuwunel_core::utils::IterStream ; π use tuwunel_core::utils::future::TryExtExt ; π use tuwunel_core::utils::math::usize_from_ruma_bounded ; π use tuwunel_core::utils::stream::BroadbandExt ; π use tuwunel_core::utils::stream::ReadyExt ; π use tuwunel_core::utils::stream::TryIgnore ; π use tuwunel_core::utils::stream::WidebandExt ; π use tuwunel_matrix::Event ; π use tuwunel_matrix::pdu::PduEvent ; π use tuwunel_matrix::pdu::RawPduId ; π use tuwunel_service::Services ; π use tuwunel_service::rooms::lazy_loading ; π use tuwunel_service::rooms::lazy_loading::Options ; π use tuwunel_service::rooms::lazy_loading::Witness ; π use tuwunel_service::rooms::short::ShortRoomId ; π use tuwunel_service::rooms::short::ShortStateHash ; π use tuwunel_service::rooms::short::ShortStateKey ; π use tuwunel_service::rooms::timeline::PdusIterItem ; π use crate::Ruma ; π use crate::is_ignored_pdu ; π use crate::message::add_membership_unsigned ; π use crate::message::event_filter ; π use crate::message::event_filters ; π use crate::message::ignored_filter ; π use crate::message::lazy_loading_witness ; π use crate::message::related_by_filter ; π use crate::message::with_membership ; π ContextArgs Shared inputs for event_context , the core behind both the client-server
/context route and the admin room-context endpoint. TimelineHalf π Shared inputs for the two collect_timeline_half calls assembling the
before and after windows; only the stream and take count differ per call. LIMIT_DEFAULT π LIMIT_MAX π build_state_response π collect_timeline_half π event_context Loads the timeline window around an event with its state and aggregations,
applying (unless bypass_visibility) the per-user visibility and ignore
checks. fallback_shortstatehash π Selects the state a requester reads in place of an eventβs missing state. get_context_route π GET /_matrix/client/r0/rooms/{roomId}/context/{eventId}load_state_ids π Loads the room state at the event that anchors the responseβs state. resolve_base_event π