Fixed small issue when attempting to apply filters by language

This commit is contained in:
Manuel Cortez 2022-11-07 11:28:42 -06:00
parent 2c7eab60a8
commit 0e814a765a
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -231,7 +231,7 @@ def filter_tweet(tweet, tweet_data, settings, buffer_name):
if word not in getattr(tweet, value):
return False
if settings["filters"][i]["in_lang"] == "True":
if getattr(tweet, lang) not in settings["filters"][i]["languages"]:
if getattr(tweet, "lang") not in settings["filters"][i]["languages"]:
return False
elif settings["filters"][i]["in_lang"] == "False":
if tweet.lang in settings["filters"][i]["languages"]: