Skip to content

Support replying to messages with voice recordings#6464

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

Support replying to messages with voice recordings#6464
kalix127 wants to merge 6 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

@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
onRequestFocus()
}
previousVoiceMessageState = voiceMessageState
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you think it is a good idea to show the keyboard when the voice message is just send? It will annoy the users who want to send several voice message in a row.

(Also this change is out of scope of this PR)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Users can send multiple voice messages in a row, with or without the keyboard open.

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