We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08e4cce commit 769b44aCopy full SHA for 769b44a
sogs/filtration.py
@@ -5,9 +5,11 @@
5
6
def should_drop_message_with_body(body):
7
"""return true if we should drop a message given its body"""
8
+ body = message_body(body)
9
+ if body is None:
10
+ return False
11
if os.path.exists(config.BAD_WORDS_FILE):
- body = message_body(body)
- with open(config.BAD_WORDS_FILE, 'r') as f:
12
+ with open(config.BAD_WORDS_FILE, 'rb') as f:
13
for line in f:
14
word = line.rstrip()
15
if word in body:
0 commit comments