Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Feb 9, 2023
1 parent f3af786 commit 8640f73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notifier/function/lib/function/telegram.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def notify(text)
memoize def connection
Faraday.new(API_URL) do |f|
f.request :json
f.response :raise_error
# f.response :raise_error
end
end

def send_notification(chat_id:, text:)
Console.logger.info(self) { "chat_id=#{chat_id}, text=#{text}, token=#{@token[0..2]}" }
connection.post("/bot#{@token}/sendMessage", chat_id:, text:, parse_mode: "Markdown")
response = connection.post("/bot#{@token}/sendMessage", chat_id:, text:, parse_mode: "Markdown")
Console.logger.info(self) { "body=#{response.body}" }
end
end

0 comments on commit 8640f73

Please sign in to comment.