fix: un-forget how streams work

This commit is contained in:
timedout
2026-06-20 17:08:00 +01:00
parent 3faedc4581
commit ddb4ef539f
@@ -15,7 +15,6 @@
room::member::{MembershipState, RoomMemberEventContent},
},
};
use serde_json::{json, value::to_raw_value};
use crate::rooms::timeline::{RawPduId, pdu_fits};
@@ -272,13 +271,8 @@ pub async fn handle_incoming_pdu<'a>(
"Attempting to squash extremities after upgrading pdu"
);
// Try to send a dummy event to squash extremities. See issue #1844
while let Some(user_id) = self
.services
.state_cache
.local_users_in_room(room_id)
.next()
.await
{
let mut local_users = self.services.state_cache.local_users_in_room(room_id);
while let Some(user_id) = local_users.next().await {
let state_lock = self.services.state.mutex.lock(room_id).await;
if self
.services
@@ -286,11 +280,7 @@ pub async fn handle_incoming_pdu<'a>(
.build_and_append_pdu(
PartialPdu {
event_type: "org.matrix.dummy_event".into(),
content: to_raw_value(&json!({})).expect("john json"),
unsigned: None,
state_key: None,
redacts: None,
timestamp: None,
..PartialPdu::default()
},
&user_id,
Some(room_id),