Setting onBeforeChat to success=false doesn't close the chat when pressing enter
This also fixes the new chat not closing when you press enter with it blank.
ui/templates/messages/messages.js L352:
if (!msgConfig.success)
return;
if (val.trim() === '')
return;
to
if (!msgConfig.success) {
this.toggle(false);
return;
}
if (val.trim() === '') {
this.toggle(false);
return;
}