Expand description
Reads room-state snapshots and evaluates state-based access policy.
The service resolves current and historical state into typed events. It also centralizes visibility, redaction, erasure, invite, and tombstone decisions.
Re-exportsยง
use std::sync::Arc;๐use async_trait::async_trait;๐use futures::FutureExt;๐use futures::TryFutureExt;๐use futures::future::try_join;๐use ruma::EventEncryptionAlgorithm;๐use ruma::OwnedRoomAliasId;๐use ruma::RoomId;๐use ruma::UserId;๐use ruma::events::StateEventType;๐use ruma::events::room::avatar::RoomAvatarEventContent;๐use ruma::events::room::canonical_alias::RoomCanonicalAliasEventContent;๐use ruma::events::room::create::RoomCreateEventContent;๐use ruma::events::room::encryption::RoomEncryptionEventContent;๐use ruma::events::room::guest_access::GuestAccess;๐use ruma::events::room::guest_access::RoomGuestAccessEventContent;๐use ruma::events::room::history_visibility::HistoryVisibility;๐use ruma::events::room::join_rules::JoinRule;๐use ruma::events::room::join_rules::RoomJoinRulesEventContent;๐use ruma::events::room::member::RoomMemberEventContent;๐use ruma::events::room::name::RoomNameEventContent;๐use ruma::events::room::power_levels::RoomPowerLevels;๐use ruma::events::room::power_levels::RoomPowerLevelsEventContent;๐use ruma::events::room::topic::RoomTopicEventContent;๐use ruma::room::RoomType;๐use tuwunel_core::Result;๐use tuwunel_core::err;๐use tuwunel_core::implement;๐use tuwunel_core::utils::BoolExt;๐use tuwunel_core::utils::OptionExt;๐use tuwunel_matrix::Event;๐use tuwunel_matrix::Pdu;๐use tuwunel_matrix::room::state::resolution::events::RoomCreateEvent;๐use tuwunel_matrix::room_version;๐use crate::rooms::state_compressor::CompressedState;๐use crate::rooms::timeline::Mapped;๐
Modulesยง
- checked ๐
- Check-only reads of room state.
- erased ๐
- Applies sender-erasure pruning to client and federation event views.
- room_
state ๐ - Resolves the current state snapshot for a room.
- server_
can ๐ - Evaluates federation visibility against historical room state.
- state ๐
- Reads events and short IDs from a historical room-state snapshot.
- user_
can ๐ - Evaluates user visibility and event-authoring permissions.
Structsยง
- Service
- Resolves room state and answers state-based authorization questions.
Functionsยง
- plain_
text_ ๐topic - Resolves room-topic content to a non-empty plain-text rendering.