mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-27 10:18:30 +00:00
fix(policy-server): Avoid unnecessary database lookup
This commit is contained in:
parent
8e7801f323
commit
732c69f5ca
1 changed files with 1 additions and 10 deletions
|
@ -26,20 +26,11 @@ pub async fn policyserv_check(&self, pdu: &PduEvent, room_id: &RoomId) -> Result
|
||||||
return Ok(());
|
return Ok(());
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// TODO: dont do *this*
|
|
||||||
let pdu_json = self.services.timeline.get_pdu_json(pdu.event_id()).await?;
|
|
||||||
let outgoing = self
|
let outgoing = self
|
||||||
.services
|
.services
|
||||||
.sending
|
.sending
|
||||||
.convert_to_outgoing_federation_event(pdu_json)
|
.convert_to_outgoing_federation_event(pdu.to_canonical_object())
|
||||||
.await;
|
.await;
|
||||||
// let s = match serde_json::to_string(outgoing.as_ref()) {
|
|
||||||
// | Ok(s) => s,
|
|
||||||
// | Err(e) => {
|
|
||||||
// warn!("Failed to convert pdu {} to outgoing federation event: {e}",
|
|
||||||
// pdu.event_id()); return Err!(Request(InvalidParam("Failed to convert PDU
|
|
||||||
// to outgoing event."))); },
|
|
||||||
// };
|
|
||||||
debug!("Checking pdu {outgoing:?} for spam with policy server {via} for room {room_id}");
|
debug!("Checking pdu {outgoing:?} for spam with policy server {via} for room {room_id}");
|
||||||
let response = self
|
let response = self
|
||||||
.services
|
.services
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue