forked from indymedia/epicyon
Global word filter
parent
0d9a12ac22
commit
eda542cd34
|
@ -66,6 +66,11 @@ def isFiltered(baseDir: str, nickname: str, domain: str, content: str) -> bool:
|
|||
if isTwitterPost(content):
|
||||
return True
|
||||
|
||||
globalFiltersFilename = baseDir + '/accounts/filters.txt'
|
||||
if os.path.isfile(globalFiltersFilename):
|
||||
if content in open(globalFiltersFilename).read():
|
||||
return True
|
||||
|
||||
filtersFilename = baseDir + '/accounts/' + \
|
||||
nickname + '@' + domain + '/filters.txt'
|
||||
if os.path.isfile(filtersFilename):
|
||||
|
|
Loading…
Reference in New Issue