[469] Prevent sending messages that are only whitespace (spaces, tab characters, etc.)
Closes #469 (closed). A simple fix - adds .trim()
to the check if val == ''
(changed to val.trim() == null
);
Method documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim Browser compatibility is at the bottom.
Edited by Big Bad Waffle