fix: Store event_id on state events received from send_knock

This commit is contained in:
Erwan Leboucher authored and Ellis Git committed 2026-10-28 23:22:52 +00:00
1 parent a825b7db8b
commit c5e976f4bc
1 file changed
+2 -1
+2 -1
View File
@@ -587,7 +587,7 @@ async fn knock_room_helper_remote(
let mut state_map: HashMap<u64, OwnedEventId> = HashMap::new();
for event in state {
for mut event in state {
let Some(state_key) = event.get("state_key") else {
debug_warn!("send_knock stripped state event missing state_key: {event:?}");
continue;
@@ -614,6 +614,7 @@ async fn knock_room_helper_remote(
.get_or_create_shortstatekey(&event_type, &state_key)
.await;
event.insert("event_id".into(), CanonicalJsonValue::String(event_id.to_string()));
services.rooms.outlier.add_pdu_outlier(&event_id, &event);
state_map.insert(shortstatekey, event_id.clone());
}