Drop Like related to inbox objects

This commit is contained in:
Thomas Sileo 2022-07-11 20:53:59 +02:00
parent 296cb05ace
commit 12c328a0b3
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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