diff options
author | David Eisner <david.eisner@oriel.oxon.org> | 2016-10-04 12:28:42 +0100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2016-10-21 08:43:35 +1100 |
commit | 0090116d87585ab6e433ba7c04198271848c43c0 (patch) | |
tree | 3b9a7a1054ac0920be9b23e774e459c7f457525d | |
parent | 3ab461dc64d8cadd61a67e632fde309fb887d1e8 (diff) | |
download | gitlab-ce-0090116d87585ab6e433ba7c04198271848c43c0.tar.gz |
Full Banzai rendering for HipChat notifications
-rw-r--r-- | app/models/project_services/hipchat_service.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/models/project_services/hipchat_service.rb b/app/models/project_services/hipchat_service.rb index 98f0312d84e..f4edbbbceb2 100644 --- a/app/models/project_services/hipchat_service.rb +++ b/app/models/project_services/hipchat_service.rb @@ -121,14 +121,6 @@ class HipchatService < Service message end - def format_body(body) - if body - body = body.truncate(200, separator: ' ', omission: '...') - end - - "<pre>#{body}</pre>" - end - def create_issue_message(data) user_name = data[:user][:name] @@ -144,7 +136,7 @@ class HipchatService < Service message = "#{user_name} #{state} #{issue_link} in #{project_link}: <b>#{title}</b>" if description - message << format_body(Banzai::Filter::MarkdownFilter.renderer.render(description)) + message << Banzai.render(note, project: project) end message @@ -166,7 +158,7 @@ class HipchatService < Service "#{project_link}: <b>#{title}</b>" if description - message << format_body(Banzai::Filter::MarkdownFilter.renderer.render(description)) + message << Banzai.render(note, project: project) end message @@ -217,7 +209,7 @@ class HipchatService < Service message << title if note - message << format_body(Banzai::Filter::MarkdownFilter.renderer.render(note)) + message << Banzai.render(note, project: project) end message |