Skip to main contentModule send_server_notice
Source use axum::extract::State; π use futures::FutureExt; π use futures::StreamExt; π use futures::TryFutureExt; π use futures::TryStreamExt; π use futures::future::ready; π use ruma::DeviceId; π use ruma::OwnedEventId; π use ruma::OwnedRoomId; π use ruma::RoomId; π use ruma::RoomVersionId; π use ruma::TransactionId; π use ruma::UserId; π use ruma::events::room::create::RoomCreateEventContent; π use ruma::events::room::guest_access::GuestAccess; π use ruma::events::room::guest_access::RoomGuestAccessEventContent; π use ruma::events::room::history_visibility::HistoryVisibility; π use ruma::events::room::history_visibility::RoomHistoryVisibilityEventContent; π use ruma::events::room::join_rules::JoinRule; π use ruma::events::room::join_rules::RoomJoinRulesEventContent; π use ruma::events::room::member::MembershipState; π use ruma::events::room::member::RoomMemberEventContent; π use ruma::events::room::message::RoomMessageEventContent; π use ruma::events::room::name::RoomNameEventContent; π use ruma::events::room::power_levels::RoomPowerLevelsEventContent; π use ruma::events::tag::TagName; π use ruma::serde::Raw; π use synapse_admin_api::server_notices::send::by_txn; π use synapse_admin_api::server_notices::send::v1; π use synapse_admin_api::server_notices::send::v1::Response; π use tuwunel_api_client::notice_tag; π use tuwunel_api_client::room_is_notice; π use tuwunel_core::Err; π use tuwunel_core::Result; π use tuwunel_core::err; π use tuwunel_core::utils::BoolExt; π use tuwunel_core::utils::FutureBoolExt; π use tuwunel_core::utils::future::ReadyBoolExt; π use tuwunel_core::utils::str_from_bytes; π use tuwunel_core::utils::stream::IterStream; π use tuwunel_core::utils::stream::ReadyExt; π use tuwunel_matrix::pdu::PduBuilder; π use tuwunel_service::Services; π use crate::RumaAdmin; π
- admin_send_server_notice_route π
- Sends a notice through
POST /_synapse/admin/v1/send_server_notice. - admin_send_server_notice_txn_route π
- Sends a notice through
PUT /_synapse/admin/v1/send_server_notice/{txn_id}. - check_existing_txnid π
- Replays a stored notice response for the requesting user and device.
- create_notice_room π
- Creates a private room whose recipient can read notices but cannot post.
- find_notice_room π
- Finds the first marked room in joined, invited, then left membership order.
- notice_candidate π
- Retains a candidate room only when its notice marker can be verified.
- notice_power_levels π
- Reserves posting and room administration for the server identity.
- notice_response π
- Decodes a cached event ID while distinguishing incompatible transaction data.
- send_notice π
- Sends an event from the server identity into the targetβs notice room.
- send_notice_txn π
- Sends a new transaction and records its event ID for subsequent retries.