mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
fix: #7086
This commit is contained in:
@@ -36,7 +36,10 @@ module.exports = function (Messaging) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
content = String(data.content);
|
||||
content = String(data.content).trim();
|
||||
if (!content) {
|
||||
return callback(new Error('[[error:invalid-chat-message]]'));
|
||||
}
|
||||
|
||||
var maximumChatMessageLength = (meta.config.maximumChatMessageLength || 1000);
|
||||
if (content.length > maximumChatMessageLength) {
|
||||
|
||||
@@ -19,7 +19,9 @@ module.exports = function (Messaging) {
|
||||
if (raw === content) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (!String(content).trim()) {
|
||||
return callback(new Error('[[error:invalid-chat-message]]'));
|
||||
}
|
||||
Messaging.setMessageFields(mid, {
|
||||
content: content,
|
||||
edited: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user