diff --git a/app/lib/server/functions/sendMessage.js b/app/lib/server/functions/sendMessage.js index a1b7fe0cafb2..1d1fafc16493 100644 --- a/app/lib/server/functions/sendMessage.js +++ b/app/lib/server/functions/sendMessage.js @@ -208,7 +208,7 @@ export const sendMessage = function(user, message, room, upsert = false) { message = Object.assign(message, result); // Some app may have inserted malicious/invalid values in the message, let's check it again - validateMessage(message, user._id); + validateMessage(message, room, user); } }