Skip to main content Module message Copy item path Source use axum::extract::State; π use futures::FutureExt; π use futures::StreamExt; π use futures::TryFutureExt; π use futures::pin_mut; π use ruma::DeviceId; π use ruma::RoomId; π use ruma::UInt; π use ruma::UserId; π use ruma::api::Direction; π use ruma::api::client::filter::RoomEventFilter; π use ruma::api::client::message::get_message_events; π use ruma::events::AnyStateEvent; π use ruma::events::StateEventType; π use ruma::events::TimelineEventType; π use ruma::events::relation::RelationType; π use ruma::serde::Raw; π use tuwunel_core::Err ; π use tuwunel_core::Result ; π use tuwunel_core::at ; π use tuwunel_core::err ; π use tuwunel_core::ref_at ; π use tuwunel_core::smallvec::SmallVec; π use tuwunel_core::utils::BoolExt ; π use tuwunel_core::utils::IterStream ; π use tuwunel_core::utils::ReadyExt ; π use tuwunel_core::utils::math::usize_from_ruma_bounded ; π use tuwunel_core::utils::result::LogErr ; π use tuwunel_core::utils::stream::BroadbandExt ; π use tuwunel_core::utils::stream::TryIgnore ; π use tuwunel_core::utils::stream::WidebandExt ; π use tuwunel_matrix::PduId ; π use tuwunel_matrix::event::Event ; π use tuwunel_matrix::event::Matches ; π use tuwunel_matrix::pdu::PduCount ; π use tuwunel_matrix::pdu::PduEvent ; π 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::timeline::PdusIterItem ; π use super::visibility_filter ; π use crate::Ruma ; π use ruma::events::TimelineEventType::*; π MessagesArgs Shared inputs for get_messages , the pagination core behind both the
client-server /messages route and the admin room-messages endpoint. IGNORED_MESSAGE_TYPES π list of safe and common non-state events to ignore if the user is ignored.
MUST be sorted by TimelineEventType::event_type_str() for binary_search. LIMIT_DEFAULT π LIMIT_MAX π _is_sorted π add_membership_unsigned π with_membership adapter for timeline-iterator items.annotate_membership π MSC4115: stamp unsigned.membership on a served PDU with the requesting
userβs membership at the time of the event. The MSC permits omitting the
property when calculating it is expensive, so the project restricts it to
encrypted rooms where membership-vs-event ordering matters for key share. event_filter π event_filters π get_member_event π get_message_events_route π GET /_matrix/client/r0/rooms/{roomId}/messagesget_messages Paginates a roomβs timeline, applying the request filter and (unless
bypass_visibility) the per-user visibility and ignore filters. ignored_filter π is_ignored_pdu π lazy_loading_witness π related_by_filter π MSC3440 related_by_*: include an event only when another event relates
to it matching the filterβs reverse-relation criteria. A no-op stage when
the filter carries neither field. with_membership annotate_membership consume-and-return adapter for stream chains.RelTypes π MSC3440 related_by_rel_types entries, typed at the compare boundary.