Optimize expected auth types checking.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2025-08-29 06:49:04 +00:00
1 parent 4b66911886
commit 757d38e891
3 files changed
+20 -19

No files matched your search

+3
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;
}
}
-1
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