mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-27 18:28:31 +00:00
fix(policy-server): Update ask_policy_server docstring
This commit is contained in:
parent
99ebe022ed
commit
fe06d78c8e
1 changed files with 10 additions and 1 deletions
|
@ -12,7 +12,16 @@ use ruma::{
|
||||||
events::{StateEventType, room::policy::RoomPolicyEventContent},
|
events::{StateEventType, room::policy::RoomPolicyEventContent},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Returns Ok if the policy server allows the event
|
/// Asks a remote policy server if the event is allowed.
|
||||||
|
///
|
||||||
|
/// If the event is the `org.matrix.msc4284.policy` configuration state event,
|
||||||
|
/// this check is skipped. Similarly, if there is no policy server configured in
|
||||||
|
/// the PDU's room, or the configured server is not present in the room, the
|
||||||
|
/// check is also skipped.
|
||||||
|
///
|
||||||
|
/// If the policy server marks the event as spam, Ok(false) is returned,
|
||||||
|
/// otherwise Ok(true) allows the event. If the policy server cannot be
|
||||||
|
/// contacted for whatever reason, Err(e) is returned.
|
||||||
#[implement(super::Service)]
|
#[implement(super::Service)]
|
||||||
#[tracing::instrument(skip_all, level = "debug")]
|
#[tracing::instrument(skip_all, level = "debug")]
|
||||||
pub async fn ask_policy_server(&self, pdu: &PduEvent, room_id: &RoomId) -> Result<bool> {
|
pub async fn ask_policy_server(&self, pdu: &PduEvent, room_id: &RoomId) -> Result<bool> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue