mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Tweak old inbox data pruning
This commit is contained in:
parent
89e21b88e3
commit
6a267d3463
1 changed files with 2 additions and 2 deletions
|
@ -57,12 +57,12 @@ async def _prune_old_inbox_objects(
|
||||||
models.InboxObject.announced_via_outbox_object_ap_id.is_(None),
|
models.InboxObject.announced_via_outbox_object_ap_id.is_(None),
|
||||||
# Keep objects related to local conversations
|
# Keep objects related to local conversations
|
||||||
or_(
|
or_(
|
||||||
models.InboxObject.conversation.not_like(f"{BASE_URL}/%"),
|
models.InboxObject.conversation.not_like(f"{BASE_URL}%"),
|
||||||
models.InboxObject.conversation.is_(None),
|
models.InboxObject.conversation.is_(None),
|
||||||
),
|
),
|
||||||
# Keep activities related to the outbox (like Like/Announce/Follow...)
|
# Keep activities related to the outbox (like Like/Announce/Follow...)
|
||||||
or_(
|
or_(
|
||||||
models.InboxObject.activity_object_ap_id.not_like(f"{BASE_URL}/*"),
|
models.InboxObject.activity_object_ap_id.not_like(f"{BASE_URL}*"),
|
||||||
models.InboxObject.activity_object_ap_id.is_(None),
|
models.InboxObject.activity_object_ap_id.is_(None),
|
||||||
),
|
),
|
||||||
# Keep direct messages
|
# Keep direct messages
|
||||||
|
|
Loading…
Reference in a new issue