Skip to content

Commit

Permalink
Merge pull request #62 from tomaslin/optional-pounding
Browse files Browse the repository at this point in the history
make the pound (#) in a slack channel name optional
  • Loading branch information
tomaslin committed Jan 26, 2016
2 parents 0f899ff + 50cbd91 commit 0d79d03
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class SlackNotificationService implements NotificationService {
def body = notificationTemplateEngine.build(notification, NotificationTemplateEngine.Type.BODY)
notification.to.each {
slack.sendMessage(token, new SlackMessage(
text: body,
channel: it
text: body,
channel: it.startsWith('#') ? it : "#${it}".toString()
))
}
}
Expand Down

0 comments on commit 0d79d03

Please sign in to comment.