mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
fix: un-forget how streams work
This commit is contained in:
1 file changed
+3
-13
@@ -15,7 +15,6 @@ use ruma::{
|
|||||||
room::member::{MembershipState, RoomMemberEventContent},
|
room::member::{MembershipState, RoomMemberEventContent},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use serde_json::{json, value::to_raw_value};
|
|
||||||
|
|
||||||
use crate::rooms::timeline::{RawPduId, pdu_fits};
|
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"
|
"Attempting to squash extremities after upgrading pdu"
|
||||||
);
|
);
|
||||||
// Try to send a dummy event to squash extremities. See issue #1844
|
// Try to send a dummy event to squash extremities. See issue #1844
|
||||||
while let Some(user_id) = self
|
let mut local_users = self.services.state_cache.local_users_in_room(room_id);
|
||||||
.services
|
while let Some(user_id) = local_users.next().await {
|
||||||
.state_cache
|
|
||||||
.local_users_in_room(room_id)
|
|
||||||
.next()
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
let state_lock = self.services.state.mutex.lock(room_id).await;
|
let state_lock = self.services.state.mutex.lock(room_id).await;
|
||||||
if self
|
if self
|
||||||
.services
|
.services
|
||||||
@@ -286,11 +280,7 @@ pub async fn handle_incoming_pdu<'a>(
|
|||||||
.build_and_append_pdu(
|
.build_and_append_pdu(
|
||||||
PartialPdu {
|
PartialPdu {
|
||||||
event_type: "org.matrix.dummy_event".into(),
|
event_type: "org.matrix.dummy_event".into(),
|
||||||
content: to_raw_value(&json!({})).expect("john json"),
|
..PartialPdu::default()
|
||||||
unsigned: None,
|
|
||||||
state_key: None,
|
|
||||||
redacts: None,
|
|
||||||
timestamp: None,
|
|
||||||
},
|
},
|
||||||
&user_id,
|
&user_id,
|
||||||
Some(room_id),
|
Some(room_id),
|
||||||
|
|||||||
Reference in new issue
Block a user