1
0
Fork 1

Old android doesn't support IsCyrrilic

(cherry picked from commit 2d26b383f4c0e7e6290533a7a9157f7fde8f2814)
This commit is contained in:
Stephen Paul Weber 2024-10-30 15:20:28 +01:00 committed by Arne
parent 9dc3fa2ce9
commit f7d810999d

View file

@ -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;