mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-04 06:11:47 +00:00
fix: Opportunistically re-use room format rules when parsing incoming PDUs
This commit is contained in:
1 parent
87030a3a22
commit
fbf81fcdeb
9 files changed
+48
-47
No files matched your search
@@ -48,14 +48,16 @@ impl super::Service {
|
||||
let mut auth_chain_map = HashMap::with_capacity(event_auth.auth_chain.len());
|
||||
|
||||
for auth_pdu_json in event_auth.auth_chain {
|
||||
let (auth_event_room_id, auth_event_id, auth_pdu_json) =
|
||||
match self.parse_incoming_pdu(&auth_pdu_json).await {
|
||||
| Ok(parsed) => parsed,
|
||||
| Err(e) => {
|
||||
warn!(error=?e, "Dropping auth chain event as it could not be parsed");
|
||||
continue;
|
||||
},
|
||||
};
|
||||
let (auth_event_room_id, auth_event_id, auth_pdu_json) = match self
|
||||
.parse_incoming_pdu(&auth_pdu_json, Some(room_version_rules))
|
||||
.await
|
||||
{
|
||||
| Ok(parsed) => parsed,
|
||||
| Err(e) => {
|
||||
warn!(error=?e, "Dropping auth chain event as it could not be parsed");
|
||||
continue;
|
||||
},
|
||||
};
|
||||
if let Err(e) = Self::pdu_format_check_1(
|
||||
&auth_pdu_json,
|
||||
room_version_rules,
|
||||
|
||||
Reference in new issue
Block a user