From 8e7fbcc501acbbefe7dcd6290824f1d3ef1de4e4 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Tue, 11 Oct 2022 20:49:06 +0200 Subject: [PATCH] Tweak actor refresh --- app/actor.py | 5 +++-- app/boxes.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/actor.py b/app/actor.py index 1bbe1e2..76e985b 100644 --- a/app/actor.py +++ b/app/actor.py @@ -248,8 +248,9 @@ async def update_actor_if_needed( actor_in_db.ap_actor = ra.ap_actor actor_in_db.handle = ra.handle actor_in_db.ap_type = ra.ap_type - actor_in_db.updated_at = now() - await db_session.flush() + + actor_in_db.updated_at = now() + await db_session.flush() @dataclass diff --git a/app/boxes.py b/app/boxes.py index dd27a19..cc21a9a 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -2209,6 +2209,8 @@ async def save_to_inbox( elif activity_ro.ap_type == "View": # View is used by Peertube, there's nothing useful we can do with it await db_session.delete(inbox_object) + elif activity_ro.ap_type == "Block": + pass else: logger.warning(f"Received an unknown {inbox_object.ap_type} object")