mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
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:
parent
e2cba15ed2
commit
7672cc8473
5 changed files with 25 additions and 23 deletions
|
|
@ -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)> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue