diff --git a/src/service/rooms/state_accessor/state.rs b/src/service/rooms/state_accessor/state.rs index 7c0c7a45..c83b687a 100644 --- a/src/service/rooms/state_accessor/state.rs +++ b/src/service/rooms/state_accessor/state.rs @@ -420,19 +420,24 @@ async fn load_full_state(&self, shortstatehash: ShortStateHash) -> Result Result { - const BUFSIZE: usize = size_of::(); - self.services .short .get_shorteventid(event_id) - .and_then(|shorteventid| { - self.db - .shorteventid_shortstatehash - .aqry::(&shorteventid) - }) + .and_then(|shorteventid| self.get_shortstatehash(shorteventid)) + .await +} + +/// Returns the state hash at this event. +#[implement(super::Service)] +pub async fn get_shortstatehash(&self, shorteventid: ShortEventId) -> Result { + const BUFSIZE: usize = size_of::(); + + self.db + .shorteventid_shortstatehash + .aqry::(&shorteventid) .await .deserialized() }