mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 12:16:54 +00:00
fix: Store event_id on state events received from send_knock
This commit is contained in:
1 parent
a825b7db8b
commit
c5e976f4bc
1 file changed
+2
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user