Try to fix crash because of spam detection

This commit is contained in:
Arne 2024-11-25 12:10:18 +01:00
parent 7749d4bee2
commit 100d4752c6

View file

@ -1574,7 +1574,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
return;
}
} catch (final java.util.regex.PatternSyntaxException e) { } // Not supported on old android
if (body.length() > 320 || !m.getLinks().isEmpty() || (!"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|v seti|[Pp]rii?vee?t|there\\?|online\\?|exploit|bit\\.ly|goo\\.gl|tinyurl\\.com|tiny\\.cc|lc\\.chat|is\\.gd|soo\\.gd|s2r\\.co|clicky\\.me|budrul\\.com|bc\\.vc|uguu\\.se).*")) {
if (body.length() > 320 || !m.getLinks().isEmpty() || 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|\\?OTR|write me when will be|v seti|[Pp]rii?vee?t|there\\?|online\\?|exploit).*")) {
anyMatchSpam = true;
return;
}