Skip to main content

check_send_policy

Function check_send_policy 

Source
pub(crate) async fn check_send_policy(
    services: &Services,
    sender_user: &UserId,
    event_type: &MessageLikeEventType,
    content: &Raw<AnyMessageLikeEventContent>,
) -> Result<Option<OwnedEventId>>
Expand description

Applies the sender’s policy for sending a message event, before the room lock.

Refuses encrypted events when encryption is disabled, local redactions when the server disables them, and a suspended sender’s events other than self-redactions. Returns the target of a redaction for the top-level redacts field.