From 2c225e1033aead023b95971f0d8491cb40c8c564 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Wed, 4 Jun 2025 20:02:00 +0200 Subject: [PATCH 1/2] feat(ffi): Add reply_params to GalleryUploadParameters Signed-off-by: Johannes Marbach --- bindings/matrix-sdk-ffi/src/timeline/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/timeline/mod.rs b/bindings/matrix-sdk-ffi/src/timeline/mod.rs index 468193cfdb6..2ba868e547a 100644 --- a/bindings/matrix-sdk-ffi/src/timeline/mod.rs +++ b/bindings/matrix-sdk-ffi/src/timeline/mod.rs @@ -1391,7 +1391,7 @@ mod galleries { use crate::{ error::RoomError, ruma::{AudioInfo, FileInfo, FormattedBody, ImageInfo, Mentions, VideoInfo}, - timeline::{build_thumbnail_info, Timeline}, + timeline::{build_thumbnail_info, ReplyParameters, Timeline}, }; #[derive(uniffi::Record)] @@ -1402,6 +1402,8 @@ mod galleries { formatted_caption: Option, /// Optional intentional mentions to be sent with the gallery. mentions: Option, + /// Optional parameters for sending the media as (threaded) reply. + reply_params: Option, } #[derive(uniffi::Enum)] @@ -1586,7 +1588,8 @@ mod galleries { let mut gallery_config = GalleryConfig::new() .caption(params.caption) .formatted_caption(formatted_caption) - .mentions(params.mentions.map(Into::into)); + .mentions(params.mentions.map(Into::into)) + .reply(params.reply_params.map(|p| p.try_into()).transpose()?); for item_info in item_infos { gallery_config = gallery_config.add_item(item_info.try_into()?); From bbfa2f60a8e106a111de33ff08c42eef8d1da9f7 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Wed, 4 Jun 2025 20:04:34 +0200 Subject: [PATCH 2/2] Add changelog --- bindings/matrix-sdk-ffi/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/matrix-sdk-ffi/CHANGELOG.md b/bindings/matrix-sdk-ffi/CHANGELOG.md index 5cac359d7fe..03971097ccd 100644 --- a/bindings/matrix-sdk-ffi/CHANGELOG.md +++ b/bindings/matrix-sdk-ffi/CHANGELOG.md @@ -34,6 +34,8 @@ Additions: ([#4994](https://github.com/matrix-org/matrix-rust-sdk/pull/4994)) - Add `Timeline::send_gallery` to send MSC4274-style galleries. ([#5163](https://github.com/matrix-org/matrix-rust-sdk/pull/5163)) +- Add `reply_params` to `GalleryUploadParameters` to allow sending galleries as (threaded) replies. + ([#5173](https://github.com/matrix-org/matrix-rust-sdk/pull/5173)) Breaking changes: