Commit ce61de68 authored by Marin Jankovski's avatar Marin Jankovski

Use allowed slack team name.

parent cccfede3
...@@ -40,7 +40,8 @@ class SlackService < Service ...@@ -40,7 +40,8 @@ class SlackService < Service
project_name: project_name project_name: project_name
)) ))
credentials = webhook.match(/(\w*).slack.com.*services\/(.*)/) credentials = webhook.match(/([\w-]*).slack.com.*services\/(.*)/)
if credentials.present? if credentials.present?
subdomain = credentials[1] subdomain = credentials[1]
token = credentials[2].split("token=").last token = credentials[2].split("token=").last
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment