Users can currently send empty message by pressing Enter in the chat field or pressing the Send Message. To that user, this looks like:

To other users, this looks like:

This can be simply avoided by preventing submission if the value of the field run through trim() has a length of zero, since that indicates the entire message is whitespace or the message is blank.