Optimize expected auth types checking.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-08-28 05:58:06 +00:00
parent 4b66911886
commit 757d38e891
3 changed files with 20 additions and 19 deletions

View File

@@ -293,6 +293,7 @@ where
.state
.get_room_version(pdu.room_id())
.await?;
match room_version_id {
| V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 => {
if let Some(redact_id) = pdu.redacts() {
@@ -434,6 +435,7 @@ where
self.services
.sending
.send_pdu_appservice(appservice.registration.id.clone(), pdu_id)?;
continue;
}
@@ -450,6 +452,7 @@ where
self.services
.sending
.send_pdu_appservice(appservice.registration.id.clone(), pdu_id)?;
continue;
}
}

View File

@@ -132,7 +132,6 @@ pub async fn build_and_append_pdu(
once(pdu.event_id()),
state_lock,
)
.boxed()
.await?;
// We set the room state after inserting the pdu, so that we never have a moment