mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
enabled always sending mentions (#16227)
refs TryGhost/Team#2507 -removed labs check from sending service -labs flag controls seeing mentions in admin and receiving mentions
This commit is contained in:
parent
02953490a5
commit
5ccb778ac8
@ -218,7 +218,7 @@
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Webmentions</h4>
|
||||
<p class="gh-expandable-description">
|
||||
Allow receiving webmentions from external sites and sending webmentions when linking external sites in posts.
|
||||
Allows receiving webmentions from external sites and viewing them on the dashboard.
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
|
@ -13,7 +13,6 @@ const events = require('../../lib/common/events');
|
||||
const externalRequest = require('../../../server/lib/request-external.js');
|
||||
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');
|
||||
@ -89,7 +88,7 @@ module.exports = {
|
||||
externalRequest,
|
||||
getSiteUrl: () => urlUtils.urlFor('home', true),
|
||||
getPostUrl: post => getPostUrl(post),
|
||||
isEnabled: () => labs.isSet('webmentions') && !settingsCache.get('is_private')
|
||||
isEnabled: () => !settingsCache.get('is_private')
|
||||
});
|
||||
sendingService.listen(events);
|
||||
}
|
||||
|
@ -31,8 +31,6 @@ describe('Mentions Service', function () {
|
||||
});
|
||||
|
||||
beforeEach(async function () {
|
||||
await mockManager.mockLabsEnabled('webmentions');
|
||||
|
||||
// externalRequest does dns lookup; stub to make sure we don't fail with fake domain names
|
||||
sinon.stub(dnsPromises, 'lookup').callsFake(function () {
|
||||
return Promise.resolve({address: '123.123.123.123'});
|
||||
@ -72,18 +70,6 @@ describe('Mentions Service', function () {
|
||||
assert.equal(endpointMock.isDone(), false);
|
||||
});
|
||||
|
||||
it('Respects the disabled flag', async function () {
|
||||
await mockManager.mockLabsDisabled('webmentions');
|
||||
let publishedPost = {status: 'published', ...mentionsPost};
|
||||
await agent
|
||||
.post('posts/')
|
||||
.body({posts: [publishedPost]})
|
||||
.expectStatus(201);
|
||||
|
||||
assert.equal(mentionMock.isDone(), false);
|
||||
assert.equal(endpointMock.isDone(), false);
|
||||
});
|
||||
|
||||
it('Email only post published', async function () {
|
||||
let publishedPost = {status: 'published', email_only: true, ...mentionsPost};
|
||||
await agent
|
||||
|
Loading…
Reference in New Issue
Block a user