Don't call policy server on ourselves

(cherry picked from commit a8c10f6317011ee9db3db968f7a4f81284211780)
This commit is contained in:
nexy7574 2025-06-19 20:28:13 +01:00
parent 4c30eec355
commit cd479604fe
No known key found for this signature in database
GPG key ID: 0FA334385D0B689F

View file

@ -237,7 +237,7 @@ pub(super) async fn upgrade_outlier_to_timeline_pdu(
}
// 15. If the event is not a state event, ask the policy server about it
if incoming_pdu.state_key.is_none() {
if incoming_pdu.state_key.is_none() && incoming_pdu.sender().server_name() != self.services.globals.server_name() {
debug!("Checking policy server for event {}", incoming_pdu.event_id);
let policy = self.policyserv_check(
&incoming_pdu.event_id,