Skip to main contentModule appservice
Source use std::collections::BTreeMap; π use std::collections::BTreeSet; π use std::str::from_utf8; π use base64::Engine as _; π use base64::engine::general_purpose::URL_SAFE_NO_PAD; π use futures::StreamExt; π use futures::future::join; π use ruma::OneTimeKeyAlgorithm; π use ruma::OwnedDeviceId; π use ruma::OwnedUserId; π use ruma::UInt; π use ruma::UserId; π use ruma::api::appservice::event::push_events::v1::AnyAppserviceToDeviceEvent; π use ruma::api::appservice::event::push_events::v1::DeviceLists; π use ruma::api::appservice::event::push_events::v1::EphemeralData; π use ruma::api::appservice::event::push_events::v1::Request as PushEventsRequest; π use ruma::events::AnyTimelineEvent; π use ruma::serde::Raw; π use serde::Deserialize; π use serde::Deserialize; π use tuwunel_core::debug_warn; π use tuwunel_core::err; π use tuwunel_core::implement; π use tuwunel_core::itertools::Itertools; π use tuwunel_core::smallvec::SmallVec; π use tuwunel_core::utils::IterStream; π use tuwunel_core::utils::ReadyExt; π use tuwunel_core::utils::calculate_hash; π use tuwunel_core::utils::stream::BroadbandExt; π use tuwunel_core::utils::stream::WidebandExt; π use tuwunel_matrix::Event; π use super::SendingResult; π use crate::appservice::RegistrationInfo; π use crate::sending::Destination; π use crate::sending::SendingEvent; π use crate::sending::Service; π use crate::sending::TAG_PREFIX_LEN; π
- Parts π
- The wire pieces of one appservice transaction, accumulated per event.
- ToDeviceRecipient π
- The appservice-injected recipient fields of a queued to-device event
(MSC4203).
- Part π
- One queued event rendered for the appservice transaction.
- dedup π
- Devices π
- The MSC3202-interesting devices of one transaction: the appservice
senderβs plus matched PDU sendersβ devices and the to-device recipients.
- FallbackTypes π
- MSC3202
device_unused_fallback_key_types: algorithms with an unused
fallback key, keyed by user then device. - OtkCounts π
- MSC3202
device_one_time_keys_count: unclaimed one-time-key counts per
algorithm, keyed by user then device. - UserDevice π
- One device of one user.