Skip to content

Support replying to messages with voice recordings#6464

Open
kalix127 wants to merge 7 commits intoelement-hq:developfrom
kalix127:feat/reply-with-voice-message
Open

Support replying to messages with voice recordings#6464
kalix127 wants to merge 7 commits intoelement-hq:developfrom
kalix127:feat/reply-with-voice-message

Conversation

@kalix127
Copy link
Copy Markdown
Contributor

Content

Add support for replying to messages with a voice recording. The infrastructure already existed end-to-end (MediaSender.sendVoiceMessage() accepts inReplyToEventId), but the voice message presenter was not wiring it through.

Changes:

  • Extract reply event ID from composer mode and pass it to mediaSender.sendVoiceMessage()
  • Show the reply banner during voice recording/preview using the same TextInputBox wrapper
  • Reset composer mode after sending a voice message reply
  • Dismiss keyboard when voice recording starts
  • Add unit test verifying reply event ID is passed correctly

Motivation and context

Closes #4053

Users could not reply to a message with a voice recording. Tapping "Reply" and then recording audio would send the voice message without the reply relation, and the reply banner would disappear during recording.

Screenshots / GIFs

video-3.mp4

Tests

  • Open a room, long-press a message, tap Reply
  • Record a voice message - verify the reply banner stays visible during recording and preview
  • Verify the keyboard dismisses when recording starts
  • Send the voice message - verify the banner closes and the message appears as a reply in the timeline
  • Send a voice message without replying - verify it sends as a normal message

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@kalix127 kalix127 requested a review from a team as a code owner March 25, 2026 00:04
@kalix127 kalix127 requested review from ganfra and removed request for a team March 25, 2026 00:04
@bmarty bmarty added the Z-Community-PR Issue is solved by a community member's PR label Mar 25, 2026
@americanrefugee
Copy link
Copy Markdown

I like it! LGTM

Copy link
Copy Markdown
Contributor

@bxdxnn bxdxnn left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

kalix127 added a commit to kalix127/element-x-android that referenced this pull request Apr 2, 2026
Copy link
Copy Markdown
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.09%. Comparing base (aa5b1f5) to head (67729f8).
⚠️ Report is 181 commits behind head on develop.

Files with missing lines Patch % Lines
...ent/android/libraries/textcomposer/TextComposer.kt 30.76% 7 Missing and 2 partials ⚠️
...ssages/impl/messagecomposer/MessageComposerView.kt 0.00% 1 Missing ⚠️
...s/composer/DefaultVoiceMessageComposerPresenter.kt 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6464      +/-   ##
===========================================
- Coverage    81.10%   81.09%   -0.02%     
===========================================
  Files         2585     2585              
  Lines        70836    70854      +18     
  Branches      9097     9100       +3     
===========================================
+ Hits         57452    57456       +4     
- Misses       10003    10018      +15     
+ Partials      3381     3380       -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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reply to a message with an audio message

5 participants