Skip to content

feat!(timeline): allow sending media as (thread) replies #4852

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

Merged
merged 12 commits into from
Apr 2, 2025

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Mar 26, 2025

This implements step 3 of #4835.

  • Public API changes documented in changelogs (optional)

@Johennes Johennes changed the title refactor(timeline): push the reply logic down into matrix_sdk feat!(timeline): allow sending media as (thread) replies Mar 26, 2025
@Johennes Johennes force-pushed the johannes/attachment-replies branch 2 times, most recently from 5bfb877 to 38cca2f Compare March 26, 2025 19:31
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.56%. Comparing base (d30dc71) to head (45bdaa1).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/send_queue/upload.rs 84.61% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4852   +/-   ##
=======================================
  Coverage   86.55%   86.56%           
=======================================
  Files         300      300           
  Lines       34966    34980   +14     
=======================================
+ Hits        30266    30281   +15     
+ Misses       4700     4699    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Johennes Johennes force-pushed the johannes/attachment-replies branch from 38cca2f to acc8ce3 Compare March 27, 2025 13:20
@Johennes Johennes marked this pull request as ready for review March 27, 2025 13:29
@Johennes Johennes requested a review from a team as a code owner March 27, 2025 13:29
@Johennes Johennes requested review from Hywan and removed request for a team March 27, 2025 13:29
Comment on lines +233 to +234
/// Optional parameters for sending the media as (threaded) reply.
reply_params: Option<ReplyParameters>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this here to not have to duplicate the send_* methods for the various media types. Maybe we could also use this to merge send_reply and send_thread_reply?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that would make sense (maybe as a followup PR, to not have this one drag for too long?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate PR makes sense. 👍

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A first round of review comments here, but it looks like this is on the right track!

@Johennes Johennes requested a review from bnjbvr April 1, 2025 11:29
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we're getting close to landing this! LGTM on principle that we can address the last comments without large changes.

Comment on lines +233 to +234
/// Optional parameters for sending the media as (threaded) reply.
reply_params: Option<ReplyParameters>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that would make sense (maybe as a followup PR, to not have this one drag for too long?)

@bnjbvr bnjbvr enabled auto-merge (squash) April 2, 2025 12:24
@bnjbvr bnjbvr merged commit dccd836 into matrix-org:main Apr 2, 2025
42 checks passed
@Johennes
Copy link
Contributor Author

Johennes commented Apr 2, 2025

Thanks a lot for your patience with me figuring things out through multiple rounds of review here. 🙏

@bnjbvr
Copy link
Member

bnjbvr commented Apr 2, 2025

No worries, thanks a lot for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants