live: disable topic denylist for testing (TOPIC_FILTER=1 restores)
This commit is contained in:
1 parent
280c330303
commit
0ccc97164a
1 file changed
+4
@@ -249,6 +249,10 @@ _TOPIC_DENYLIST = {
|
|||||||
"kill all", "how to make a bomb", "how to build a bomb",
|
"kill all", "how to make a bomb", "how to build a bomb",
|
||||||
}
|
}
|
||||||
def _topic_allowed(topic):
|
def _topic_allowed(topic):
|
||||||
|
# denylist disabled for testing (2026-10-02): set TOPIC_FILTER=1 in the
|
||||||
|
# environment to restore the check without a code change
|
||||||
|
if os.environ.get("TOPIC_FILTER", "0") != "1":
|
||||||
|
return True
|
||||||
low = topic.lower()
|
low = topic.lower()
|
||||||
return not any(term in low for term in _TOPIC_DENYLIST)
|
return not any(term in low for term in _TOPIC_DENYLIST)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user