in text-moderation/functions/index.js [49:63]
function moderateMessage(message) {
// Re-capitalize if the user is Shouting.
if (isShouting(message)) {
functions.logger.log('User is shouting. Fixing sentence case...');
message = stopShouting(message);
}
// Moderate if the user uses SwearWords.
if (containsSwearwords(message)) {
functions.logger.log('User is swearing. moderating...');
message = moderateSwearwords(message);
}
return message;
}