1
0
mirror of https://gitlab.com/brutaldon/brutaldon synced 2025-06-05 21:49:32 +02:00

Fix filters in notifications

This commit is contained in:
Jason McBrayer
2019-04-02 14:31:10 -04:00
parent 1a14dd8c3b
commit 53a0938f7b

View File

@@ -174,6 +174,8 @@ def toot_matches_filters(toot, filters=[]):
phrases = [maybe_rewrite_filter(x) for x in filters] phrases = [maybe_rewrite_filter(x) for x in filters]
pattern = "|".join(phrases) pattern = "|".join(phrases)
try: try:
if toot.get('type') in ['reblog', 'favourite']:
return re.search(pattern, toot.status.spoiler_text + toot.status.content, re.I)
return re.search(pattern, toot.spoiler_text + toot.content, re.I) return re.search(pattern, toot.spoiler_text + toot.content, re.I)
except: except:
return False return False