Improved App.Utils.signatureIdentify() again, ignore messages with less then 8 lines and less then 300 chars.
This commit is contained in:
parent
ed811af795
commit
e1f85d571f
1 changed files with 2 additions and 3 deletions
|
@ -250,11 +250,10 @@ class App.Utils
|
||||||
@signatureIdentify: (message, test = false) ->
|
@signatureIdentify: (message, test = false) ->
|
||||||
textToSearch = @html2text(message)
|
textToSearch = @html2text(message)
|
||||||
|
|
||||||
# count lines, if we do have lower the 8 or more then 300 chars ignore this
|
# if we do have less then 8 lines and less then 300 chars ignore this
|
||||||
textToSearchInLines = textToSearch.split("\n")
|
textToSearchInLines = textToSearch.split("\n")
|
||||||
if !test
|
if !test
|
||||||
return message if textToSearch.length < 300
|
return message if textToSearchInLines.length < 8 && textToSearch.length < 300
|
||||||
return message if textToSearchInLines.length < 8
|
|
||||||
|
|
||||||
quote = (str) ->
|
quote = (str) ->
|
||||||
(str + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")
|
(str + '').replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")
|
||||||
|
|
Loading…
Reference in a new issue