Merge branch 'get-thumbnail-mxc-as-ref' into 'next'

Do not copy mxc string unnecessarily in db.get_thumbnail()

See merge request famedly/conduit!272
This commit is contained in:
Jonas Platte 2022-01-27 17:14:42 +00:00
commit 296c68c0cd
2 changed files with 2 additions and 2 deletions

View file

@ -207,7 +207,7 @@ pub async fn get_content_thumbnail_route(
}) = db
.media
.get_thumbnail(
mxc.clone(),
&mxc,
&db.globals,
body.width
.try_into()

View file

@ -171,7 +171,7 @@ impl Media {
/// For width,height <= 96 the server uses another thumbnailing algorithm which crops the image afterwards.
pub async fn get_thumbnail(
&self,
mxc: String,
mxc: &str,
globals: &Globals,
width: u32,
height: u32,