use OwnedMxcUri in media service

Not using `MxcData` because it borrows it's fields, and so we wouldn't
be able to return an owned `MxcData` from functions that read the db.
This commit is contained in:
Benjamin Lee 2024-09-14 20:43:56 -07:00
parent e2cba15ed2
commit 7672cc8473
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4
5 changed files with 25 additions and 23 deletions

View file

@ -1,4 +1,4 @@
use ruma::api::client::error::ErrorKind;
use ruma::{api::client::error::ErrorKind, OwnedMxcUri};
use crate::{
database::KeyValueDatabase,
@ -88,7 +88,7 @@ impl TryFrom<&MediaFileKey> for MediaFileKeyParts {
impl service::media::Data for KeyValueDatabase {
fn create_file_metadata(
&self,
mxc: String,
mxc: OwnedMxcUri,
width: u32,
height: u32,
meta: &FileMeta,
@ -121,7 +121,7 @@ impl service::media::Data for KeyValueDatabase {
fn search_file_metadata(
&self,
mxc: String,
mxc: OwnedMxcUri,
width: u32,
height: u32,
) -> Result<(FileMeta, MediaFileKey)> {