Skip to content

Commit

Permalink
Merge pull request #26 from RodrigoMNardi/feature/slack_commands
Browse files Browse the repository at this point in the history
Slack Command
  • Loading branch information
RodrigoMNardi authored Nov 21, 2023
2 parents 66319e7 + fa27c8b commit c085224
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/github_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,11 @@ def sinatra_logger_level
logger.debug "Received Slack command: #{payload.inspect}"
puts "Received Slack command: #{payload.inspect}"

message =
case payload['event']
when 'subscribe'
Slack::Subscribe.new.call(payload)
when 'running'
Slack::Running.new.call(payload)
else
'I am a teapot'
end
message = if payload.key? 'event'
Slack::Running.new.call(payload)
else
Slack::Subscribe.new.call(payload)
end

halt 200, message
end
Expand Down

0 comments on commit c085224

Please sign in to comment.