mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
parent
b45e955dea
commit
44a02c7d36
@ -45,7 +45,7 @@ function ping(post) {
|
||||
if (slackSettings && slackSettings.url && slackSettings.url !== '') {
|
||||
slackSettings.username = slackSettings.username ? slackSettings.username : 'Ghost';
|
||||
// Only ping when not a page
|
||||
if (post.page) {
|
||||
if (post.type === 'page') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ function ping(post) {
|
||||
title = post.title,
|
||||
url = urlService.getUrlByResourceId(post.id, {absolute: true});
|
||||
|
||||
if (post.page || config.isPrivacyDisabled('useRpcPing') || settingsCache.get('is_private')) {
|
||||
if (post.type === 'page' || config.isPrivacyDisabled('useRpcPing') || settingsCache.get('is_private')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ describe('Slack', function () {
|
||||
});
|
||||
|
||||
it('does not make a request if post is a page', function () {
|
||||
const post = testUtils.DataGenerator.forKnex.createPost({page: true});
|
||||
const post = testUtils.DataGenerator.forKnex.createPost({type: 'page'});
|
||||
isPostStub.returns(true);
|
||||
settingsCacheStub.withArgs('slack').returns(slackObjWithUrl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user