Skip to main content

Module redact

Module redact 

Source
Expand description

Replaces accepted timeline events with their room-version redacted form.

Redaction can retain the original JSON for operators and removes searchable or relational content before overwriting the accepted row. These side effects are coordinated under the caller’s room timeline guard.

Re-exportsΒ§

use std::mem::take; πŸ”’
use futures::future::join; πŸ”’
use ruma::CanonicalJsonObject; πŸ”’
use ruma::CanonicalJsonValue; πŸ”’
use ruma::EventId; πŸ”’
use ruma::RoomId; πŸ”’
use ruma::canonical_json::RedactedBecause; πŸ”’
use ruma::canonical_json::redact_in_place; πŸ”’
use ruma::events::TimelineEventType; πŸ”’
use ruma::room_version_rules::RedactionRules; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::err; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::OptionExt; πŸ”’
use tuwunel_core::utils::result::NotFound; πŸ”’
use tuwunel_core::utils::to_canonical_object; πŸ”’
use tuwunel_matrix::event::Event; πŸ”’
use tuwunel_matrix::pdu::PRIVATE_UNSIGNED; πŸ”’
use super::Position; πŸ”’
use crate::integrity::leading_json; πŸ”’
use crate::rooms::short::ShortRoomId; πŸ”’
use crate::rooms::threads::thread_bundle_mut; πŸ”’
use crate::rooms::threads::thread_root; πŸ”’
use crate::rooms::timeline::RoomMutexGuard; πŸ”’

EnumsΒ§

Restoration πŸ”’
What recording a redaction on the event it redacts would do.

FunctionsΒ§

already_redacted πŸ”’
The redacted form of an event whose content the redaction already removed.
recorded_event_id πŸ”’
recorded_redaction πŸ”’
redact_keeping_thread πŸ”’
Redacts an event, keeping the unsigned fields private to its sender and, when asked, its thread summary.
redacted_because πŸ”’
The redaction as recorded on the event it redacts, without its own unsigned.
restorable πŸ”’
Whether a stored event in the room is of a type a redaction can apply to.
unsigned_mut πŸ”’