blob: 9690de1db7fd68dae6085305e2c7e1084ac5b46b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import math
from datetime import UTC, datetime, timedelta
from com import FilterableNote, FilterAction
from sec import connect, tokens
user_id = "9gszslkcdfnomssj"
token = tokens["pain"]
api = "https://void.rehab/api"
def criteria(root: FilterableNote) -> (bool, FilterAction):
# if it's more than two months old, delete
latest = max(map(lambda note: note.when, root.thread_self()))
if (datetime.now(UTC) - latest).days > 60:
return FilterAction.Obliterate
else:
return FilterAction.Ignore
|