mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 00:56:36 +02:00
lock the getter instead ??? c/o M
This commit is contained in:
parent
d88dd042f4
commit
d157ff25a4
3 changed files with 3 additions and 2 deletions
|
@ -141,7 +141,7 @@ pub(super) async fn upgrade_outlier_to_timeline_pdu(
|
||||||
let extremities: Vec<_> = self
|
let extremities: Vec<_> = self
|
||||||
.services
|
.services
|
||||||
.state
|
.state
|
||||||
.get_forward_extremities(room_id)
|
.get_forward_extremities(room_id, &state_lock)
|
||||||
.map(ToOwned::to_owned)
|
.map(ToOwned::to_owned)
|
||||||
.ready_filter(|event_id| {
|
.ready_filter(|event_id| {
|
||||||
// Remove any that are referenced by this incoming event's prev_events
|
// Remove any that are referenced by this incoming event's prev_events
|
||||||
|
|
|
@ -384,6 +384,7 @@ impl Service {
|
||||||
pub fn get_forward_extremities<'a>(
|
pub fn get_forward_extremities<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
room_id: &'a RoomId,
|
room_id: &'a RoomId,
|
||||||
|
_state_lock: &'a RoomMutexGuard,
|
||||||
) -> impl Stream<Item = &EventId> + Send + '_ {
|
) -> impl Stream<Item = &EventId> + Send + '_ {
|
||||||
let prefix = (room_id, Interfix);
|
let prefix = (room_id, Interfix);
|
||||||
|
|
||||||
|
|
|
@ -654,7 +654,7 @@ impl Service {
|
||||||
let prev_events: Vec<OwnedEventId> = self
|
let prev_events: Vec<OwnedEventId> = self
|
||||||
.services
|
.services
|
||||||
.state
|
.state
|
||||||
.get_forward_extremities(room_id)
|
.get_forward_extremities(room_id, _mutex_lock)
|
||||||
.take(20)
|
.take(20)
|
||||||
.map(Into::into)
|
.map(Into::into)
|
||||||
.collect()
|
.collect()
|
||||||
|
|
Loading…
Add table
Reference in a new issue