mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
Fix get_closest_parent and cleanup federation/send/:txn
This commit is contained in:
1 parent
b13049a6fa
commit
acd144e934
6 files changed
+69
-334
No files matched your search
@@ -405,11 +405,12 @@ impl Rooms {
|
||||
|
||||
pub fn get_closest_parent(
|
||||
&self,
|
||||
room: &RoomId,
|
||||
incoming_prev_ids: &[EventId],
|
||||
their_state: &BTreeMap<EventId, Arc<StateEvent>>,
|
||||
) -> Result<Option<ClosestParent>> {
|
||||
match self.pduid_pdu.last()? {
|
||||
Some(val)
|
||||
match self.pduid_pdu.scan_prefix(room.as_bytes()).last() {
|
||||
Some(Ok(val))
|
||||
if incoming_prev_ids.contains(
|
||||
&serde_json::from_slice::<PduEvent>(&val.1)
|
||||
.map_err(|_| {
|
||||
|
||||
Reference in new issue
Block a user