stopped private sites from sending mentions (#16160)

refs [TryGhost/Team#2467](https://github.com/TryGhost/Team/issues/2467)
- sites marked private should not send mentions to external sites
This commit is contained in:
Steve Larson 2023-01-30 08:13:22 -06:00 committed by GitHub
parent 477295a262
commit 68ef33800c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ const urlUtils = require('../../../shared/url-utils');
const outputSerializerUrlUtil = require('../../../server/api/endpoints/utils/serializers/output/utils/url');
const labs = require('../../../shared/labs');
const urlService = require('../url');
const settingsCache = require('../../../shared/settings-cache');
const DomainEvents = require('@tryghost/domain-events');
const jobsService = require('../jobs');
@ -69,7 +70,7 @@ module.exports = {
externalRequest,
getSiteUrl: () => urlUtils.urlFor('home', true),
getPostUrl: post => getPostUrl(post),
isEnabled: () => labs.isSet('webmentions')
isEnabled: () => labs.isSet('webmentions') && !settingsCache.get('is_private')
});
sendingService.listen(events);
}