Skip to main content

Module send_server_notice

Module send_server_notice 

Source

Re-exportsΒ§

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; πŸ”’

FunctionsΒ§

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.