6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/shopapp/panicker_api.rb', line 6
def general_message(text_to_send = '', bot: nil, target: nil, txt: nil, company: nil)
txt ||= text_to_send
RestClient.post "https://panic.ozz.fi/shoot.json?key=#{Rails.configuration.settings['system_panic_key']}",
{
txt: txt,
target: target,
bot: bot,
not_markdown: true
}.to_json,
{
content_type: 'application/json'
}
rescue
Rails.logger.error "Silently failing sending panicker a message #{txt}."
Rails.logger.error $!
end
|