mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
fix: Remove redundant "correct room ID" filter
This commit is contained in:
1 file changed
+1
-10
+1
-10
@@ -152,16 +152,7 @@ async fn process_inbound_transaction(
|
||||
.stream()
|
||||
.broad_then(|pdu| services.rooms.event_handler.parse_incoming_pdu(pdu))
|
||||
.inspect_err(|e| warn!("Could not parse incoming PDU: {e}"))
|
||||
.ready_filter_map(Result::ok)
|
||||
.ready_filter_map(|pdu| {
|
||||
// Room IDs should always be present on events being pushed to us in txns.
|
||||
// This also ensures incoming PDUs have the right room ID.
|
||||
pdu.2
|
||||
.get("room_id")
|
||||
.and_then(|r| r.as_str())
|
||||
.is_some_and(|v| v == pdu.0.as_str())
|
||||
.then_some(pdu)
|
||||
});
|
||||
.ready_filter_map(Result::ok);
|
||||
|
||||
let edus = body
|
||||
.edus
|
||||
|
||||
Reference in new issue
Block a user