From 12c328a0b36941fe499fbf6ba8437f45e21393bd Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 11 Jul 2022 20:53:59 +0200 Subject: [PATCH] Drop Like related to inbox objects --- app/boxes.py | 3 ++- app/main.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/boxes.py b/app/boxes.py index e1ee325..549f30e 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -948,8 +948,9 @@ async def save_to_inbox( if not relates_to_outbox_object: logger.info( "Received a like for an unknown activity: " - f"{activity_ro.activity_object_ap_id}" + f"{activity_ro.activity_object_ap_id}, deleting the activity" ) + await db_session.delete(inbox_object) else: relates_to_outbox_object.likes_count = models.OutboxObject.likes_count + 1 diff --git a/app/main.py b/app/main.py index fd339e7..6dc4c2b 100644 --- a/app/main.py +++ b/app/main.py @@ -66,9 +66,9 @@ _RESIZED_CACHE: MutableMapping[tuple[str, int], tuple[bytes, str, Any]] = LFUCac # TODO(ts): # # Next: -# - indieauth +# - allow to undo follow requests +# - indieauth tweaks # - API for posting notes -# - outgoing activity for webmentions # - allow to block servers # - FT5 text search # - support update post with history