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):
|
if isTwitterPost(content):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
globalFiltersFilename = baseDir + '/accounts/filters.txt'
|
||||||
|
if os.path.isfile(globalFiltersFilename):
|
||||||
|
if content in open(globalFiltersFilename).read():
|
||||||
|
return True
|
||||||
|
|
||||||
filtersFilename = baseDir + '/accounts/' + \
|
filtersFilename = baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + '/filters.txt'
|
nickname + '@' + domain + '/filters.txt'
|
||||||
if os.path.isfile(filtersFilename):
|
if os.path.isfile(filtersFilename):
|
||||||
|
|
Loading…
Reference in New Issue