Small adjustment, moved back to 10 lines (not 8) until the signature marker is searched.

This commit is contained in:
Martin Edenhofer 2016-02-12 08:18:12 +01:00
parent 0201d44c69
commit 2814546627
2 changed files with 3 additions and 3 deletions

View file

@ -118,7 +118,7 @@ class ArticleViewItem extends App.Controller
# prepare html body # prepare html body
if @article.content_type is 'text/html' 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) @article['html'] = App.Utils.signatureIdentify(@article.body, false, true)
else else
@article['html'] = App.Utils.signatureIdentify(@article.body) @article['html'] = App.Utils.signatureIdentify(@article.body)

View file

@ -250,9 +250,9 @@ class App.Utils
@signatureIdentify: (message, test = false, internal = false) -> @signatureIdentify: (message, test = false, internal = false) ->
textToSearch = @html2text(message) 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") 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) -> quote = (str) ->
(str + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&") (str + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")