Old android doesn't support IsCyrrilic
(cherry picked from commit 2d26b383f4c0e7e6290533a7a9157f7fde8f2814)
This commit is contained in:
parent
9dc3fa2ce9
commit
f7d810999d
1 changed files with 6 additions and 0 deletions
|
@ -1561,6 +1561,12 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||
final var script = locale.getScript();
|
||||
for (final var m : messages) {
|
||||
final var body = m.getRawBody();
|
||||
try {
|
||||
if (!"Cyrl".equals(script) && body.matches(".*\\p{IsCyrillic}.*")) {
|
||||
anyMatchSpam = true;
|
||||
return;
|
||||
}
|
||||
} catch (final java.util.regex.PatternSyntaxException e) { } // Not supported on old android
|
||||
if (body.length() > 320 || (!"Cyrl".equals(script) && body.matches(".*\\p{IsCyrillic}.*")) || body.matches(".*(?:\\n.*\\n.*\\n|[Aa]\\s*d\\s*v\\s*v\\s*e\\s*r\\s*t|[Pp]romotion|[Dd][Dd][Oo][Ss]|[Ee]scrow|payout|seller|write me when will be|[Pp]rii?vee?t|there online|bit\\.ly|goo\\.gl|tinyurl\\.com|tiny\\.cc|lc\\.chat|is\\.gd|soo\\.gd|s2r\\.co|clicky\\.me|budrul\\.com|bc\\.vc|uguu\\.se).*")) {
|
||||
anyMatchSpam = true;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue