Basic chat UI complete.

This commit is contained in:
rainbow napkin 2025-10-01 04:33:24 -04:00
parent f109314163
commit e81a4c0973
11 changed files with 393 additions and 71 deletions

View file

@ -150,17 +150,14 @@ class pmHandler{
* @returns {String} sanatized/validates message, returns null on validation failure
*/
sanatizeMessage(msg){
//if msg is empty or null
if(msg == null || msg == ''){
//Pimp slap that shit into fucking oblivion
return null;
}
//Normally I'd kill empty messages here
//But instead we're allowing them for sesh startups
//Trim and Sanatize for XSS
msg = validator.trim(validator.escape(msg));
//Return whether or not the shit was long enough
if(validator.isLength(msg, {min: 1, max: 255})){
//Return whether or not the shit was too long
if(validator.isLength(msg, {min: 0, max: 255})){
//If it's valid return the message
return msg;
}