Use allowed slack team name.

This commit is contained in:
Marin Jankovski 2014-10-21 11:38:41 +02:00
parent cccfede34c
commit ce61de68ba

View file

@ -40,7 +40,8 @@ class SlackService < Service
project_name: project_name
))
credentials = webhook.match(/(\w*).slack.com.*services\/(.*)/)
credentials = webhook.match(/([\w-]*).slack.com.*services\/(.*)/)
if credentials.present?
subdomain = credentials[1]
token = credentials[2].split("token=").last