This commit is contained in:
nanos 2024-06-25 09:01:07 +01:00
parent 721d2fc5bb
commit e6fd9c6b00

View file

@ -465,8 +465,9 @@ def toot_context_should_be_fetched(toot):
return True return True
else: else:
lastSeen = recently_checked_context[toot['uri']]['lastSeen'] lastSeen = recently_checked_context[toot['uri']]['lastSeen']
createdAt = recently_checked_context[toot['uri']]['created_at']
lastSeenInSeconds = (datetime.now(lastSeen.tzinfo) - lastSeen).total_seconds() 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): if(ageInSeconds <= 60 * 60):
# For the first hour: allow refetching context as desired # For the first hour: allow refetching context as desired
return True return True