FrostByteOrg/FrostByte

FROS-Empty messages

Opened this issue · 1 comments

Feature Description

Submitting a new message while the text area is empty results in the message being persisted in the database.

Use Case

The chat should not display empty messages as it clutters the UI and logically it does not make sense to have empty messages

Prerequisites

N/A

Any additional remarks:

The implementation should restrict this in multiple places (frontend, backend, db etc.)

Adding an addendum to this -- The database now has a constraint which will reject messages that are ''
We should also be sure to .trim() messages in our createMessage function