mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
10 lines
359 B
JavaScript
10 lines
359 B
JavaScript
const { ErrCommentingDisabled } = require('../../../errors');
|
|
|
|
// This phase checks to see if commenting is site-wide disabled.
|
|
module.exports = (ctx, comment, { asset }) => {
|
|
// Check to see if the asset has closed commenting...
|
|
if (asset.settings.disableCommenting) {
|
|
throw new ErrCommentingDisabled(asset.settings.disableCommentingMessage);
|
|
}
|
|
};
|