Skip to main content

Module update

Module update 

Source
Expand description

Membership-transition writes for the state cache.

Each transition updates paired membership indexes and removes incompatible prior states in one database transaction. Optional aggregate rebuilding refreshes room counts, server participation, and appservice decisions after the per-user transition lands.

Re-exportsยง

use std::collections::HashSet; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::future::join; ๐Ÿ”’
use futures::future::join3; ๐Ÿ”’
use ruma::EventId; ๐Ÿ”’
use ruma::OwnedServerName; ๐Ÿ”’
use ruma::RoomId; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use ruma::events::AnyStrippedStateEvent; ๐Ÿ”’
use ruma::events::AnySyncStateEvent; ๐Ÿ”’
use ruma::events::GlobalAccountDataEventType; ๐Ÿ”’
use ruma::events::RoomAccountDataEventType; ๐Ÿ”’
use ruma::events::StateEventType; ๐Ÿ”’
use ruma::events::direct::DirectEvent; ๐Ÿ”’
use ruma::events::room::create::RoomCreateEventContent; ๐Ÿ”’
use ruma::events::room::member::MembershipState; ๐Ÿ”’
use ruma::events::room::member::RoomMemberEventContent; ๐Ÿ”’
use ruma::serde::Raw; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::at; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::is_not_empty; ๐Ÿ”’
use tuwunel_core::utils::BoolExt; ๐Ÿ”’
use tuwunel_core::utils::FutureBoolExt; ๐Ÿ”’
use tuwunel_core::utils::OptionExt; ๐Ÿ”’
use tuwunel_core::utils::ReadyExt; ๐Ÿ”’
use tuwunel_core::utils::future::ReadyBoolExt; ๐Ÿ”’
use tuwunel_core::utils::result::LogErr; ๐Ÿ”’
use tuwunel_core::utils::result::NotFound; ๐Ÿ”’
use tuwunel_core::warn; ๐Ÿ”’
use tuwunel_database::Json; ๐Ÿ”’
use tuwunel_database::Map; ๐Ÿ”’
use tuwunel_database::Txn; ๐Ÿ”’
use tuwunel_database::keyval::ValBuf; ๐Ÿ”’
use tuwunel_database::serialize_key; ๐Ÿ”’
use tuwunel_database::serialize_val; ๐Ÿ”’
use tuwunel_matrix::PduCount; ๐Ÿ”’
use super::FORGOTTEN_STATE; ๐Ÿ”’

Structsยง

Invite ๐Ÿ”’
MembershipUpdate
Parameters for one membership cache transition.

Constantsยง

EMPTY_INVITE_STATE ๐Ÿ”’
Length floor for an invite whose stripped state holds no events.

Type Aliasesยง

StrippedRoomState
Optional stripped room state attached to invite and knock transitions.