db functions to delete media via MXC

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry authored and June committed 2024-02-24 13:04:13 -05:00
1 parent cc762c49e2
commit 27c29e6063
3 files changed
+58 -1

No files matched your search

+9
View File
@@ -39,6 +39,15 @@ impl service::media::Data for KeyValueDatabase {
Ok(key)
}
fn delete_file_mxc(&self, mxc: String) -> Result<()> {
let mut key = mxc.as_bytes().to_vec();
key.push(0xff);
self.mediaid_file.remove(&key)?;
Ok(())
}
fn search_file_metadata(
&self,
mxc: String,