Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(media): use the same media method when caching a thumbnail as the FFI #4160

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/matrix-sdk/src/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ impl Room {
source: source.clone(),
format: MediaFormat::Thumbnail(MediaThumbnailSettings {
size: MediaThumbnailSize {
method: ruma::media::Method::Crop,
method: ruma::media::Method::Scale,
width,
height,
},
Expand Down
6 changes: 3 additions & 3 deletions crates/matrix-sdk/tests/integration/room/attachment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async fn test_room_attachment_send_info_thumbnail() {
source: MediaSource::Plain(thumbnail_mxc.clone()),
format: MediaFormat::Thumbnail(MediaThumbnailSettings {
size: MediaThumbnailSize {
method: ruma::media::Method::Crop,
method: ruma::media::Method::Scale,
width: uint!(480),
height: uint!(360),
},
Expand Down Expand Up @@ -284,7 +284,7 @@ async fn test_room_attachment_send_info_thumbnail() {
.unwrap();

// The event was sent.
assert_eq!(event_id!("$h29iv0s8:example.com"), response.event_id);
assert_eq!(response.event_id, event_id!("$h29iv0s8:example.com"));

// The media is immediately cached in the cache store, so we don't need to set
// up another mock endpoint for getting the media.
Expand Down Expand Up @@ -313,7 +313,7 @@ async fn test_room_attachment_send_info_thumbnail() {
source: MediaSource::Plain(thumbnail_mxc),
format: MediaFormat::Thumbnail(MediaThumbnailSettings {
size: MediaThumbnailSize {
method: ruma::media::Method::Crop,
method: ruma::media::Method::Scale,
width: uint!(42),
height: uint!(1337),
},
Expand Down
Loading