oxen-io / session-android

A private messenger for Android.
https://getsession.org
GNU General Public License v3.0
1.73k stars 165 forks source link

[BUG] Very short voice messages can be sent #1522

Open AL-Session opened 1 week ago

AL-Session commented 1 week ago

Code of conduct

Self-training on how to write a bug report

Is there an existing issue for this?

Current Behavior

If you press the microphone icon to record a voice message then as long as you held it long enough to trigger a "long press" event (a few hundred ms) but then immediately release it then that sub-1-second voice message will be sent - but any voice message less than a second is typically of little use.

Further, users who might not know that you need to press and hold the record voice message button may unintentionally send short voice messages to contacts.

Expected Behavior

Voice messages should have a minimum duration of 1 second, and any voice message less than this threshold should not be sent (instead, the user should be informed that their voice message is too short to send).

Steps To Reproduce

1.) Go to record a voice message but release the record voice message (microphone) button after about half a second, 2.) Half-second-ish voice message is sent.

Android Version

Android all

Session Version

1.18.4

Anything else?

This issue is tracked internally as SES-1486 and is addressed in the following branch (PR coming momentarily once I have this issue number to mark as fixed): https://github.com/AL-Session/session-android/tree/SES-1486_ShortVoiceMessageFix