Skip to main content

Module context

Module context 

Source

Re-exportsΒ§

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; πŸ”’

StructsΒ§

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.

ConstantsΒ§

LIMIT_DEFAULT πŸ”’
LIMIT_MAX πŸ”’

FunctionsΒ§

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 πŸ”’