Skip to content

Commit

Permalink
Use allowed slack team name.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlazio authored and vsizov committed Oct 21, 2014
1 parent b1e60cf commit 9f54397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/project_services/slack_service.rb
Expand Up @@ -40,7 +40,8 @@ def execute(push_data)
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
Expand Down

0 comments on commit 9f54397

Please sign in to comment.