Move shortstatehash queries from state_accessor to state service.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2025-10-02 05:27:48 +00:00
1 parent f2740822e2
commit 83afe81f60
12 files changed
+65 -64

No files matched your search

+3 -7
View File
@@ -580,7 +580,7 @@ async fn handle_left_room(
};
let Ok(left_shortstatehash) = services
.state_accessor
.state
.pdu_shortstatehash(&left_event_id)
.await
else {
@@ -703,16 +703,12 @@ async fn load_joined_room(
.iter()
.map(at!(0))
.map(PduCount::into_unsigned)
.map(|shorteventid| {
services
.state_accessor
.get_shortstatehash(shorteventid)
})
.map(|shorteventid| services.state.get_shortstatehash(shorteventid))
.next()
.into();
let current_shortstatehash = services
.state_accessor
.state
.get_shortstatehash(last_timeline_count.into_unsigned())
.or_else(|_| services.state.get_room_shortstatehash(room_id));