diff --git a/app/models/notification_services/slack_service.rb b/app/models/notification_services/slack_service.rb index a09bbf2..10b6f19 100644 --- a/app/models/notification_services/slack_service.rb +++ b/app/models/notification_services/slack_service.rb @@ -20,7 +20,7 @@ class NotificationServices::SlackService < NotificationService def post_payload(problem) { username: "Errbit", - icon_emoji: ":collision:", + icon_url: "https://raw.githubusercontent.com/errbit/errbit/master/docs/notifications/slack/errbit.png", attachments: [ { fallback: message_for_slack(problem), diff --git a/docs/notifications/slack/errbit.png b/docs/notifications/slack/errbit.png index b9857d1..786d209 100644 Binary files a/docs/notifications/slack/errbit.png and b/docs/notifications/slack/errbit.png differ diff --git a/docs/notifications/slack/index.md b/docs/notifications/slack/index.md index 0b6aa22..314c4a0 100644 --- a/docs/notifications/slack/index.md +++ b/docs/notifications/slack/index.md @@ -14,8 +14,6 @@ Copy the Hook URL specified by the Slack service. ![Hook URL](hook_url.png) -Optionally change the name of the integration to "Errbit", and include the errbit logo for inline messages: ![Errbit](errbit.png) - ### Setup in Errbit On the App Edit Page, click to highlight the slack integration. diff --git a/spec/models/notification_service/slack_service_spec.rb b/spec/models/notification_service/slack_service_spec.rb index ebe4039..08ad8fe 100644 --- a/spec/models/notification_service/slack_service_spec.rb +++ b/spec/models/notification_service/slack_service_spec.rb @@ -9,14 +9,18 @@ describe NotificationServices::SlackService, type: 'model' do service_url: service_url end - it "it should send a notification to Slack with hook url" do + it "should have icon for slack" do + expect(Rails.root.join("docs/notifications/slack/errbit.png")).to exist + end + + it "should send a notification to Slack with hook url" do # setup problem = notice.problem # faraday stubbing payload = { username: "Errbit", - icon_emoji: ":collision:", + icon_url: "https://raw.githubusercontent.com/errbit/errbit/master/docs/notifications/slack/errbit.png", attachments: [ { fallback: service.message_for_slack(problem), -- libgit2 0.21.2