diff --git a/activities/models/post.py b/activities/models/post.py index e9bc885..40e5915 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -708,7 +708,7 @@ class Post(StatorModel): raise ValueError("Post has no content or content map") post.summary = data.get("summary") post.sensitive = data.get("sensitive", False) - post.url = data.get("url") + post.url = data.get("url", data["id"]) post.published = parse_ld_date(data.get("published")) post.edited = parse_ld_date(data.get("updated")) post.in_reply_to = data.get("inReplyTo") diff --git a/activities/services/search.py b/activities/services/search.py index a2b2d94..3d297fe 100644 --- a/activities/services/search.py +++ b/activities/services/search.py @@ -83,13 +83,11 @@ class SearchService: type = document.get("type", "unknown").lower() # Is it an identity? - print(type) if type in Identity.ACTOR_TYPES: # Try and retrieve the profile by actor URI identity = Identity.by_actor_uri(document["id"], create=True) - print("got identity") if identity and identity.state == IdentityStates.outdated: - print(async_to_sync(identity.fetch_actor)()) + async_to_sync(identity.fetch_actor)() return identity # Is it a post?