From 281454662768acb211b33cf0578daf9f12bafd51 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 12 Feb 2016 08:18:12 +0100 Subject: [PATCH] Small adjustment, moved back to 10 lines (not 8) until the signature marker is searched. --- .../app/controllers/ticket_zoom/article_view.coffee | 2 +- app/assets/javascripts/app/lib/app_post/utils.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee index e2c85f12f..0a1645495 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee @@ -118,7 +118,7 @@ class ArticleViewItem extends App.Controller # prepare html body if @article.content_type is 'text/html' - if @article.sender.type is 'Agent' + if @article.sender.name is 'Agent' @article['html'] = App.Utils.signatureIdentify(@article.body, false, true) else @article['html'] = App.Utils.signatureIdentify(@article.body) diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index 6bfc363e2..66ba50bd1 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -250,9 +250,9 @@ class App.Utils @signatureIdentify: (message, test = false, internal = false) -> textToSearch = @html2text(message) - # if we do have less then 8 lines and less then 300 chars ignore this + # if we do have less then 10 lines and less then 300 chars ignore this textToSearchInLines = textToSearch.split("\n") - return message if !test && (textToSearchInLines.length < 8 && textToSearch.length < 300) + return message if !test && (textToSearchInLines.length < 10 && textToSearch.length < 300) quote = (str) -> (str + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")