Read reply from cache

This commit is contained in:
Thomas Sileo 2019-08-16 14:44:20 +02:00
parent 5da44298a8
commit 7bd2aa4592

View file

@ -383,6 +383,10 @@ class MicroblogPubBackend(Backend):
): ):
return actor2["meta"]["object"] return actor2["meta"]["object"]
reply = DB.replies.find_one(by_remote_id(iri))
if reply:
return reply["activity"]
# Fetch the URL via HTTP # Fetch the URL via HTTP
logger.info(f"dereference {iri} via HTTP") logger.info(f"dereference {iri} via HTTP")
return super().fetch_iri(iri) return super().fetch_iri(iri)