mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
2645ff05a0
commit
261a8234e9
2 changed files with 4 additions and 3 deletions
|
@ -89,7 +89,7 @@
|
|||
"defaultValue": "[{\"label\":\"Home\", \"url\":\"/\"},{\"label\":\"Tag\", \"url\":\"/tag/getting-started/\"}, {\"label\":\"Author\", \"url\":\"/author/ghost/\"},{\"label\":\"Help\", \"url\":\"https://help.ghost.org\"}]"
|
||||
},
|
||||
"slack": {
|
||||
"defaultValue": "[{\"url\":\"\"}]"
|
||||
"defaultValue": "[{\"url\":\"\", \"username\":\"Ghost\"}]"
|
||||
},
|
||||
"unsplash": {
|
||||
"defaultValue": "{\"isActive\": true}"
|
||||
|
|
|
@ -42,6 +42,7 @@ function ping(post) {
|
|||
|
||||
// Quit here if slack integration is not activated
|
||||
if (slackSettings && slackSettings.url && slackSettings.url !== '') {
|
||||
slackSettings.username = slackSettings.username ? slackSettings.username : 'Ghost';
|
||||
// Only ping when not a page
|
||||
if (post.page) {
|
||||
return;
|
||||
|
@ -62,7 +63,7 @@ function ping(post) {
|
|||
text: `Notification from *${blogTitle}* :ghost:`,
|
||||
unfurl_links: true,
|
||||
icon_url: imageLib.blogIcon.getIconUrl(true),
|
||||
username: 'Ghost',
|
||||
username: slackSettings.username,
|
||||
// We don't want to send attachment if it is a test notification.
|
||||
attachments: [
|
||||
{
|
||||
|
@ -102,7 +103,7 @@ function ping(post) {
|
|||
text: message,
|
||||
unfurl_links: true,
|
||||
icon_url: imageLib.blogIcon.getIconUrl(true),
|
||||
username: 'Ghost'
|
||||
username: slackSettings.username
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue