-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Description
Description:
In the Video Message Recorder, the Send button is enabled even when no recording has been made. This allows users to click Send immediately after opening the recorder, resulting in an empty (0-byte) upload or inconsistent message behavior.
File:
apps/meteor/client/views/composer/VideoMessageRecorder/VideoMessageRecorder.tsx
Location: around line 50
This is both a UX issue and a data integrity bug, as users should not be able to send an empty video message.
Steps to reproduce:
- Open the Video Message Recorder in Rocket.Chat.
- Do not start recording.
- Immediately click on "Send".
- Observe the upload attempt and resulting message behavior.
Expected behavior:
- The Send button should remain disabled until a recording has actually been made.
- No upload should be attempted without recorded video data.
- Users should not be able to send a 0-byte video message.
Actual behavior:
- The Send button is enabled even when nothing has been recorded.
- Clicking Send attempts to upload an empty blob or results in inconsistent message behavior.
Screenshot :
Server Setup Information:
- Version of Rocket.Chat Server: develop (latest)
- License Type: N/A
- Number of Users: N/A
- Operating System: N/A
- Deployment Method: N/A
- Number of Running Instances: N/A
- DB Replicaset Oplog: N/A
- NodeJS Version: N/A
- MongoDB Version: N/A
Client Setup Information
- Desktop App or Browser Version: Chrome (latest)
- Operating System: (your OS here)
Additional context
Current implementation:
const sendButtonDisabled = !(VideoRecorder.cameraStarted.get() && !(recordingState === 'recording')); This logic does not ensure that a recording has actually occurred before enabling Send.
A possible minimal fix would be to ensure recorded duration exists (for example, using time as a signal):
const sendButtonDisabled = !VideoRecorder.cameraStarted.get() || recordingState !== 'idle' || !time;###Relevant logs:
Check browser DevTools → Network tab for upload attempts with empty blob or abnormal payload size.
No relevant server-side logs observed.