Skip to content

Commit

Permalink
Fix for messages without journal details
Browse files Browse the repository at this point in the history
  • Loading branch information
arturtr committed Apr 11, 2016
1 parent 62d39d8 commit 45661ba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/workers/telegram_issue_notifications_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ def perform(telegram_id, journal_id)

journal = Journal.find(journal_id)

cli_base = RedmineChatTelegram.cli_base
cli_base = RedmineChatTelegram.cli_base
chat_name = "chat##{telegram_id.abs}"

if journal.details.any?
message = details_to_strings(journal.visible_details, no_html: true).join("\\n")
end
message = if journal.details.any?
details_to_strings(journal.visible_details, no_html: true).join("\\n")
else
''
end

message << "\\n" << journal.notes unless journal.notes.blank?

Expand Down

0 comments on commit 45661ba

Please sign in to comment.