diff --git a/tasks.py b/tasks.py index 5793e8b..d7f5f05 100644 --- a/tasks.py +++ b/tasks.py @@ -117,7 +117,8 @@ def process_new_activity(self, iri: str) -> None: ) log.info(f"new activity {iri} processed") - cache_actor.delay(iri) + if not should_delete: + cache_actor.delay(iri) except (ActivityGoneError, ActivityNotFoundError): log.exception(f"dropping activity {iri}, skip processing") except Exception as err: diff --git a/templates/utils.html b/templates/utils.html index c3b586e..c428fe6 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -1,4 +1,5 @@ {% macro display_actor_inline(follower, size=50) -%} +{% if follower and follower.id %} {% if not follower.icon %} @@ -11,6 +12,7 @@ @{{ follower.preferredUsername }}@{{ follower | url_or_id | get_url | domain }} +{% endif %} {%- endmacro %}