Skip to content

Commit 0d79d03

Browse files
committed
Merge pull request #62 from tomaslin/optional-pounding
make the pound (#) in a slack channel name optional
2 parents 0f899ff + 50cbd91 commit 0d79d03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/slack/SlackNotificationService.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class SlackNotificationService implements NotificationService {
4848
def body = notificationTemplateEngine.build(notification, NotificationTemplateEngine.Type.BODY)
4949
notification.to.each {
5050
slack.sendMessage(token, new SlackMessage(
51-
text: body,
52-
channel: it
51+
text: body,
52+
channel: it.startsWith('#') ? it : "#${it}".toString()
5353
))
5454
}
5555
}

0 commit comments

Comments
 (0)