diff options
author | mia <mia@mia.jetzt> | 2024-11-20 06:52:59 -0800 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-11-20 06:52:59 -0800 |
commit | 88394c7d829c5e25be56f3efffbc9805b64736a5 (patch) | |
tree | 7121e65d652643589857819b5123214306346f32 /conf_mia.py | |
parent | 7e060e5cf2656a0a53d41ea0ff42b753316cd441 (diff) | |
download | scrubber-88394c7d829c5e25be56f3efffbc9805b64736a5.tar.gz scrubber-88394c7d829c5e25be56f3efffbc9805b64736a5.zip |
Diffstat (limited to 'conf_mia.py')
-rw-r--r-- | conf_mia.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/conf_mia.py b/conf_mia.py index a32255f..9eb0e08 100644 --- a/conf_mia.py +++ b/conf_mia.py @@ -10,7 +10,7 @@ api = "https://void.rehab/api" early_exit = 0xFFF now = datetime.now(UTC) -threshold = 0.1 +threshold = 2.0 def criteria(root: FilterableNote) -> FilterAction: thread = root.thread() @@ -34,7 +34,7 @@ def criteria(root: FilterableNote) -> FilterAction: # get my... most_recent_post = max(thread_self, key=lambda note: note.when) # ...most recent post... - score = lambda note: note.reactions + note.renotes*5 + score = lambda note: note.reactions + note.renotes*5 + 1 high_score_post = max(thread_self, key=score) # ...highest scoring post... # ...and their values... most_recent = most_recent_post.when @@ -45,7 +45,7 @@ def criteria(root: FilterableNote) -> FilterAction: # ...and check it against a threshold if weighted_score < threshold: if any(map( - lambda note: note.visibility in [Visibility.public, Visibility.unlisted], + lambda note: note.visibility in [Visibility.public, Visibility.unlisted] or note.cw, thread_self, )): return FilterAction.Obliterate |