diff --git a/src/service/rooms/event_handler/handle_outlier_pdu.rs b/src/service/rooms/event_handler/handle_outlier_pdu.rs index 208f4aa08..01f5dba22 100644 --- a/src/service/rooms/event_handler/handle_outlier_pdu.rs +++ b/src/service/rooms/event_handler/handle_outlier_pdu.rs @@ -77,6 +77,13 @@ pub(super) async fn handle_outlier_pdu<'a, Pdu>( incoming_pdu .insert("event_id".to_owned(), CanonicalJsonValue::String(event_id.as_str().to_owned())); + if let Ok(pdu_event) = self.services.timeline.get_pdu(event_id).await { + debug!( + "Already have event {event_id} as an outlier or timeline event, not re-processing" + ); + return Ok((pdu_event, incoming_pdu)); + } + let pdu_event = serde_json::from_value::( serde_json::to_value(&incoming_pdu).expect("CanonicalJsonObj is a valid JsonValue"), )