diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index e5580e51a..a0829f04d 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -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;