From e6fd9c6b00fa4594b31825c65180abd2373ed3b4 Mon Sep 17 00:00:00 2001 From: nanos Date: Tue, 25 Jun 2024 09:01:07 +0100 Subject: [PATCH] bug fix --- find_posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/find_posts.py b/find_posts.py index 975baac..ad8f18f 100644 --- a/find_posts.py +++ b/find_posts.py @@ -465,8 +465,9 @@ def toot_context_should_be_fetched(toot): return True else: lastSeen = recently_checked_context[toot['uri']]['lastSeen'] + createdAt = recently_checked_context[toot['uri']]['created_at'] lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds() - ageInSeconds = (datetime.now(lastSeen.tzinfo) - recently_checked_context[toot['uri']]['created_at']).total_seconds() + ageInSeconds = (datetime.now(createdAt.tzinfo) - createdAt).total_seconds() if(ageInSeconds <= 60 * 60): # For the first hour: allow refetching context as desired return True