Commit 41ff74ce authored by jz143's avatar jz143

also send downloader IP address to Slack

parent d8592526
......@@ -127,8 +127,8 @@ class AppFilesController < ApplicationController
@app_file.increment!(:download_count)
SendSlackUpdateJob.perform_later "%s downloaded [%s](%s) (ver. %s for %s)" \
% [if current_user.nil? then 'Guest' else current_user.display_name end, @app_file.app.name, app_url(@app_file.app), @app_file.version, @app_file.platform].map { |s| SlackNotifier.escape(s.to_s) }
SendSlackUpdateJob.perform_later "%s (IP: %s) downloaded [%s](%s) (ver. %s for %s)" \
% [if current_user.nil? then 'Guest' else current_user.display_name end, request.remote_ip, @app_file.app.name, app_url(@app_file.app), @app_file.version, @app_file.platform].map { |s| SlackNotifier.escape(s.to_s) }
end
# Use callbacks to share common setup or constraints between actions.
......
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