From 7bd2aa4592591ccbf7ff7988c3c5067769c1cf7a Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Fri, 16 Aug 2019 14:44:20 +0200 Subject: [PATCH] Read reply from cache --- core/activitypub.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/activitypub.py b/core/activitypub.py index 1be68f7..d68185c 100644 --- a/core/activitypub.py +++ b/core/activitypub.py @@ -383,6 +383,10 @@ class MicroblogPubBackend(Backend): ): return actor2["meta"]["object"] + reply = DB.replies.find_one(by_remote_id(iri)) + if reply: + return reply["activity"] + # Fetch the URL via HTTP logger.info(f"dereference {iri} via HTTP") return super().fetch_iri(iri)