Skip to main content Module respond Copy item path Source use futures::FutureExt; π use futures::TryStreamExt; π use ruma::EventId; π use ruma::OwnedEventId; π use ruma::RoomId; π use ruma::UserId; π use ruma::events::relation::InReplyTo; π use ruma::events::relation::Reply as ReplyRelation; π use ruma::events::relation::Thread; π use ruma::events::room::encrypted::Relation as EncryptedRelation; π use ruma::events::room::message::Relation; π use ruma::events::room::message::RoomMessageEventContent; π use ruma::events::room::message::RoomMessageEventContentWithoutRelation; π use serde::Deserialize ; π use serde::Deserialize ; π use tuwunel_core::Error ; π use tuwunel_core::Result ; π use tuwunel_core::error ; π use tuwunel_core::error ; π use tuwunel_core::error::default_log ; π use tuwunel_core::implement; π use tuwunel_core::utils::json::serialized_len ; π use tuwunel_core::utils::stream::IterStream ; π use tuwunel_core::utils::string::chunk ; π use tuwunel_matrix::Event ; π use tuwunel_matrix::pdu::MAX_PDU_BYTES ; π use tuwunel_matrix::pdu::PduBuilder ; π use super::CommandOutput ; π use super::notices::notice_markdown ; π use crate::rooms::state::RoomMutexGuard ; π ExtractRelatesTo π Mode π How a commandβs output events relate back to the command event. CONTENT_BUDGET π Largest serialized message content that still fits a single event. EVENT_RESERVE π Envelope overhead reserved above the message content: prev and auth event
ids at their maximum, 255-byte sender and room ids, and the signatures
block, just under 10 KiB in the worst legal case. RELATION_RESERVE π Serialized size reserved for an m.relates_to relation carrying a
maximum-length event id, so a segment measured without its relation still
fits once the relation is attached. SEGMENT_BUDGET π Largest serialized segment content, before its relation, that fits an event. command_thread π The thread root of the command event when it was itself sent inside a
thread, so the output joins that thread rather than starting a new relation. fits_segment π notice π reply_relation π thread_relation π MessageRelation π Room event relation carried by an admin response.