You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.
if /(https:\/\/slashrocket.slack.com\/archives\/)/.match(message_link)
report(message_link)
"Thank you. This message has been anonymously reported to the admin team."
else
"Please report a specific Slack message. The easiest way to do this is to right-click the timestamp (or long-press the message on mobile) and copy the link."
end
else
"Sorry, this is unauthorized behavior."
end
end
def report(message)
slack_webhook = ENV["WEBHOOK_URL"]
HTTParty.post slack_webhook, body: {"text" => "A user has reported this message: <#{message}>"}.to_json, headers: {'content-type' => 'application/json'}