unfinished untested impl of room deletion

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry
2024-02-20 22:40:46 -05:00
parent 0593dce8a6
commit a94bf2cf9f
31 changed files with 400 additions and 9 deletions
+2
View File
@@ -81,4 +81,6 @@ pub trait Data: Send + Sync {
notifies: Vec<OwnedUserId>,
highlights: Vec<OwnedUserId>,
) -> Result<()>;
fn delete_all_pdus_for_room(&self, room_id: &RoomId) -> Result<()>;
}
+4
View File
@@ -100,6 +100,10 @@ pub struct Service {
}
impl Service {
pub fn delete_all_pdus_for_room(&self, room_id: &RoomId) -> Result<()> {
self.db.delete_all_pdus_for_room(room_id)
}
#[tracing::instrument(skip(self))]
pub fn first_pdu_in_room(&self, room_id: &RoomId) -> Result<Option<Arc<PduEvent>>> {
self.all_pdus(user_id!("@doesntmatter:conduit.rs"), room_id)?