mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
fix: #8539, enforce content checks for post queue
This commit is contained in:
@@ -94,6 +94,12 @@ module.exports = function (Posts) {
|
||||
reply: 'topics:reply',
|
||||
};
|
||||
|
||||
topics.checkContent(data.content);
|
||||
if (type === 'topic') {
|
||||
topics.checkTitle(data.title);
|
||||
await topics.validateTags(data.tags);
|
||||
}
|
||||
|
||||
const [canPost] = await Promise.all([
|
||||
privileges.categories.can(typeToPrivilege[type], cid, data.uid),
|
||||
user.isReadyToQueue(data.uid, cid),
|
||||
|
||||
Reference in New Issue
Block a user