Skip to content

Commit

Permalink
bot hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
arturtr committed Apr 7, 2016
1 parent 95d591a commit 0e4deef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
name 'Redmine Chat Telegram plugin'
url 'https://github.com/centosadmin/redmine_chat_telegram'
description 'This is a plugin for Redmine which adds Telegram Group Chat to Redmine Issue'
version '1.0.2'
version '1.0.3'
author 'Centos-admin.ru'
author_url 'http://centos-admin.ru'

Expand Down
5 changes: 3 additions & 2 deletions lib/tasks/chat_telegram.rake
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ namespace :chat_telegram do

bot.get_updates(fail_silently: false) do |message|
begin
telegram_chat_id = message.chat.id.abs
telegram_chat_id = message.chat.id

begin
issue = Issue.joins(:telegram_group).find_by!(redmine_chat_telegram_telegram_groups: { telegram_id: telegram_chat_id })
issue = Issue.joins(:telegram_group).find_by!(redmine_chat_telegram_telegram_groups:
{ telegram_id: telegram_chat_id.abs })
rescue Exception => e
LOG.error "#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}"
next
Expand Down

0 comments on commit 0e4deef

Please sign in to comment.