Page MenuHomePhorge

Prevent user from sending an empty message
ClosedPublic

Authored by tusooa on Jul 8 2024, 9:03 PM.
Tags
None
Referenced Files
F85665433: D111.1788783430.diff
Sun, Sep 6, 5:17 AM
F85665432: D111.1788783425.diff
Sun, Sep 6, 5:17 AM
F85665431: D111.1788783424.diff
Sun, Sep 6, 5:17 AM
F85665430: D111.1788783413.diff
Sun, Sep 6, 5:16 AM
F85665209: D111.1788781562.diff
Sun, Sep 6, 4:46 AM
Subscribers

Details

Summary

This commit disables the send message action when the text box is empty, thus preventing the user from sending an empty text message.

Type: fix

Test Plan

Verify unit tests pass. Verify that the send message button is greyed out if the text box is empty. Verify that when you hit Ctrl+Enter when the text box is empty, no message is sent.

Diff Detail

Repository
rK kazv
Branch
tusooa/stacked
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 158
Build 305: GitLab CI for kazv
Build 304: arc lint + arc unit

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 8 2024, 9:07 PM
Harbormaster failed remote builds in B158: Diff 269!

Why should users be prevented from sending empty messages?

Matrix Spec does not seem to have a restriction on this, and Element also supports receiving empty messages.

In D111#2237, @nannanko wrote:

Why should users be prevented from sending empty messages?

Matrix Spec does not seem to have a restriction on this, and Element also supports receiving empty messages.

I just feel it's rather useless to send an empty message and it's easy for me to misclick Ctrl+Enter

This revision is now accepted and ready to land.Jul 17 2024, 7:51 PM