Skip to main content

build_redacted_because

Function build_redacted_because 

Source
fn build_redacted_because(
    redactor: &UserId,
    reason: Option<String>,
    timestamp: MilliSecondsSinceUnixEpoch,
) -> RedactedBecause
Expand description

Build a RedactedBecause object for event redaction.

Creates the redaction event metadata to be attached to the unsigned.redacted_because field of redacted events.

Read: https://spec.matrix.org/v1.17/client-server-api/#redactions

§Parameters

  • redactor: User ID performing the redaction.
  • reason: Optional reason for the redaction.
  • timestamp: Timestamp for the redaction event.

§Returns

A RedactedBecause instance representing the redaction event.