Skip to main content

Module respond

Module respond 

Source

Re-exportsΒ§

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

StructsΒ§

ExtractRelatesTo πŸ”’

EnumsΒ§

Mode πŸ”’
How a command’s output events relate back to the command event.

ConstantsΒ§

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.

FunctionsΒ§

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

Type AliasesΒ§

MessageRelation πŸ”’
Room event relation carried by an admin response.