敏感词大小写的问题
This commit is contained in:
@@ -2229,7 +2229,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
public boolean addSensitiveWords(List<String> words) {
|
||||
for (String word :
|
||||
words) {
|
||||
databaseStore.persistSensitiveWord(word);
|
||||
databaseStore.persistSensitiveWord(word.toLowerCase());
|
||||
}
|
||||
lastUpdateSensitiveTime = 0;
|
||||
return true;
|
||||
|
||||
@@ -58,6 +58,7 @@ public class SensitiveFilter {
|
||||
return sensitiveWords;
|
||||
}
|
||||
|
||||
text = text.toLowerCase();
|
||||
for(int i=0;i<text.length();i++){
|
||||
int sensitiveWordLength = getSensitiveWordLength(text, i, matchType);
|
||||
if(sensitiveWordLength>0){
|
||||
|
||||
Reference in New Issue
Block a user