diff --git a/federation/entities/activitypub/models.py b/federation/entities/activitypub/models.py index 9151965..84ee45d 100644 --- a/federation/entities/activitypub/models.py +++ b/federation/entities/activitypub/models.py @@ -589,7 +589,6 @@ class Person(Object, base.Profile): capabilities = CompactedDict(litepub.capabilities) suspended = fields.Boolean(toot.suspended) public = True - finger = None _cached_inboxes = None _cached_public_key = None _cached_image_urls = None @@ -1256,8 +1255,7 @@ def extract_receivers(entity): profile = None # don't care about receivers for payloads without an actor_id if getattr(entity, 'actor_id'): - profile = get_profile(fid=entity.actor_id) - if not profile: profile = retrieve_and_parse_profile(entity.actor_id) + profile = retrieve_and_parse_profile(entity.actor_id) if not profile: return receivers for attr in ("to", "cc"): diff --git a/federation/utils/network.py b/federation/utils/network.py index 765c9b6..d5e4ba4 100644 --- a/federation/utils/network.py +++ b/federation/utils/network.py @@ -21,7 +21,7 @@ logger = logging.getLogger("federation") USER_AGENT = "python/federation/%s" % __version__ session = CachedSession('fed_cache', backend=get_requests_cache_backend('fed_cache')) -EXPIRATION = datetime.timedelta(hours=2) +EXPIRATION = datetime.timedelta(hours=6) def fetch_content_type(url: str) -> Optional[str]: """