From 28644f236e7e8871b365696a3c03e43adbd19aaa Mon Sep 17 00:00:00 2001
From: Nyaaori <+@nyaaori.cat>
Date: Mon, 15 Aug 2022 18:46:50 +0200
Subject: [PATCH 01/18] refactor: prepare src/database/key_value.rs from
src/service/rooms/state/data.rs
---
src/{service/rooms/state/data.rs => database/key_value.rs} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/{service/rooms/state/data.rs => database/key_value.rs} (100%)
diff --git a/src/service/rooms/state/data.rs b/src/database/key_value.rs
similarity index 100%
rename from src/service/rooms/state/data.rs
rename to src/database/key_value.rs
From 1442c64420345b7e6dff7e19cb628348d3d96c6a Mon Sep 17 00:00:00 2001
From: Nyaaori <+@nyaaori.cat>
Date: Mon, 15 Aug 2022 18:46:50 +0200
Subject: [PATCH 02/18] refactor: restore src/service/rooms/state/data.rs
---
src/service/rooms/state/data.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 src/service/rooms/state/data.rs
diff --git a/src/service/rooms/state/data.rs b/src/service/rooms/state/data.rs
new file mode 100644
index 00000000..4b42ca8e
--- /dev/null
+++ b/src/service/rooms/state/data.rs
@@ -0,0 +1,16 @@
+pub trait Data {
+ fn get_room_shortstatehash(room_id: &RoomId);
+}
+
+ /// Returns the last state hash key added to the db for the given room.
+ #[tracing::instrument(skip(self))]
+ pub fn current_shortstatehash(&self, room_id: &RoomId) -> Result