mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
new reputation limit to post links if post queue is enabled and user doesn't have enough reputation to post links, queue their posts if post queue is NOT enabled and user doesn't have enough reputation to post links show error check content on topic post, topic reply, post edit
This commit is contained in:
committed by
GitHub
parent
c989a4a328
commit
979f24b173
@@ -99,6 +99,8 @@ postsAPI.edit = async function (caller, data) {
|
||||
throw new Error(`[[error:content-too-short, ${meta.config.minimumPostLength}]]`);
|
||||
} else if (contentLen > meta.config.maximumPostLength) {
|
||||
throw new Error(`[[error:content-too-long, ${meta.config.maximumPostLength}]]`);
|
||||
} else if (!await posts.canUserPostContentWithLinks(caller.uid, data.content)) {
|
||||
throw new Error(`[[error:not-enough-reputation-to-post-links, ${meta.config['min:rep:post-links']}]]`);
|
||||
}
|
||||
|
||||
data.uid = caller.uid;
|
||||
|
||||
Reference in New Issue
Block a user