Skip to main content

Module append

Module append 

Source
Expand description

Appends authenticated events to room timelines and applies their side effects.

Incoming events first receive a state snapshot, while accepted events are assigned a normal stream count and committed to the timeline. Subsequent cache, indexing, notification, and membership effects are coordinated here.

Re-exportsΒ§

use std::collections::btree_map::Entry; πŸ”’
use std::sync::Arc; πŸ”’
use ruma::CanonicalJsonObject; πŸ”’
use ruma::CanonicalJsonValue; πŸ”’
use ruma::EventId; πŸ”’
use ruma::UserId; πŸ”’
use ruma::events::TimelineEventType; πŸ”’
use ruma::events::receipt::ReceiptThread; πŸ”’
use ruma::events::relation::RelationType; πŸ”’
use ruma::events::room::encrypted::Relation; πŸ”’
use ruma::events::room::member::MembershipState; πŸ”’
use ruma::events::room::member::RoomMemberEventContent; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::debug_warn; πŸ”’
use tuwunel_core::err; πŸ”’
use tuwunel_core::error; πŸ”’
use tuwunel_core::error; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::smallvec::SmallVec; πŸ”’
use tuwunel_core::utils::OptionExt; πŸ”’
use tuwunel_core::utils::result::LogErr; πŸ”’
use tuwunel_core::utils::result::NotFound; πŸ”’
use tuwunel_database::Json; πŸ”’
use tuwunel_matrix::event::Event; πŸ”’
use tuwunel_matrix::pdu::PduCount; πŸ”’
use tuwunel_matrix::pdu::PduEvent; πŸ”’
use tuwunel_matrix::pdu::PduId; πŸ”’
use tuwunel_matrix::pdu::RawPduId; πŸ”’
use tuwunel_matrix::room_version; πŸ”’
use super::ExtractBody; πŸ”’
use super::ExtractRelatesTo; πŸ”’
use super::ExtractRelatesToEventId; πŸ”’
use super::RoomMutexGuard; πŸ”’
use super::bias_count; πŸ”’
use crate::admin::CommandInput; πŸ”’
use crate::rooms::read_receipt::PrivateRead; πŸ”’
use crate::rooms::short::ShortRoomId; πŸ”’
use crate::rooms::short::ShortStateHash; πŸ”’
use crate::rooms::state_accessor::plain_text_topic; πŸ”’
use crate::rooms::state_cache::MembershipUpdate; πŸ”’
use crate::rooms::state_compressor::CompressedState; πŸ”’

StructsΒ§

Appended πŸ”’
Incoming πŸ”’
Inputs for admitting a federated event to the timeline.

FunctionsΒ§

nonempty_band πŸ”’
prev_state_unsigned πŸ”’
with_prev_unsigned πŸ”’
Fill a state event’s unsigned from the event it replaced.

Type AliasesΒ§

Band πŸ”’