Skip to main contentModule evaluate
Source use std::collections::BTreeMap; π use std::collections::VecDeque; π use std::iter::empty; π use std::pin::pin; π use futures::StreamExt; π use futures::TryFutureExt; π use futures::TryStreamExt; π use futures::future::join; π use futures::future::try_join; π use ruma::OwnedRoomId; π use ruma::RoomId; π use ruma::UserId; π use ruma::api::client::push::EmailPusherData; π use ruma::api::client::push::Pusher; π use ruma::api::client::push::PusherKind; π use ruma::events::room::member::MembershipState; π use ruma::push::Action; π use serde::Deserialize; π use serde::Deserialize; π use serde::Serialize; π use serde::Serialize; π use serde_json::Value as JsonValue; π use tuwunel_core::Error; π use tuwunel_core::Result; π use tuwunel_core::implement; π use tuwunel_core::is_not_equal_to; π use tuwunel_core::result::NotFound; π use tuwunel_core::utils::BoolExt; π use tuwunel_core::utils::future::OptionFutureExt; π use tuwunel_core::utils::stream::BroadbandExt; π use tuwunel_core::utils::stream::IterStream; π use tuwunel_core::utils::stream::ReadyExt; π use tuwunel_core::utils::stream::TryReadyExt; π use tuwunel_core::utils::stream::TryWidebandExt; π use tuwunel_core::warn; π use tuwunel_database::Cbor; π use tuwunel_database::Deserialized; π use tuwunel_matrix::Event; π use tuwunel_matrix::pdu::Pdu; π use tuwunel_matrix::pdu::PduId; π use tuwunel_matrix::pdu::RawPduId; π use super::render::SHOWN; π use crate::pusher::Notified; π use crate::rooms::short::ShortRoomId; π use crate::sendmail::Address; π use crate::threepid::canonicalize_email; π
- Pending π
- Scan π
- What a scan of a pusherβs notification rows gathered.
- Throttle π
- One roomβs mail throttle for one email pusher.
- Outcome
- What one evaluation of an email pusher found.
- REVISIT_MIN_MS π
- The soonest a pusher is evaluated again for a notification still being
written, in milliseconds.
- THROTTLE_MAX_MS π
- The longest a roomβs throttle grows, one day in milliseconds.
- THROTTLE_MULTIPLIER π
- Factor a roomβs throttle grows by with each mail naming it.
- deliverable π
- The address a pushkey is mailed at: its canonical form, the one the binding
was verified under.
- due_at π
- The earliest a notification that arrived at
ts may be mailed. - effective_throttle π
- A stored throttle as it applies now.
- email_data π
- gather π
- Folds one scanned row, and the notification it leaves to mail, into the
scan.
- invites π
- keep π
- readable π
- A notification row or key read past
after, or its error when a retry may
read it. - sent_throttle π
- A roomβs throttle once a mail naming it has gone out.
- transient_or_none π
- The error when a retry may succeed, else
None, which skips what failed.
- PendingRooms π
- RoomThrottle π
- StoredRow π
- Throttles π