diff --git a/bookwyrm/activitystreams.py b/bookwyrm/activitystreams.py index 7afa69921..3e1432a4b 100644 --- a/bookwyrm/activitystreams.py +++ b/bookwyrm/activitystreams.py @@ -343,6 +343,10 @@ def add_status_on_create(sender, instance, created, *args, **kwargs): def add_status_on_create_command(sender, instance, created): """runs this code only after the database commit completes""" + # boosts trigger 'saves" twice, so don't bother duplicating the task + if sender == models.Boost and not created: + return + priority = STREAMS # check if this is an old status, de-prioritize if so # (this will happen if federation is very slow, or, more expectedly, on csv import) diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index 3fe035f58..d21c9363d 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -368,10 +368,16 @@ class TagField(ManyToManyField): activity_type = item.__class__.__name__ if activity_type == "User": activity_type = "Mention" + + if activity_type == "Hashtag": + name = item.name + else: + name = f"@{getattr(item, item.name_field)}" + tags.append( activitypub.Link( href=item.remote_id, - name=f"@{getattr(item, item.name_field)}", + name=name, type=activity_type, ) ) diff --git a/bookwyrm/templates/book/editions/search_filter.html b/bookwyrm/templates/book/editions/search_filter.html index 91c76422d..d4cba6baf 100644 --- a/bookwyrm/templates/book/editions/search_filter.html +++ b/bookwyrm/templates/book/editions/search_filter.html @@ -4,7 +4,7 @@ {% block filter %}
- +
{% endblock %} diff --git a/bookwyrm/templates/get_started/books.html b/bookwyrm/templates/get_started/books.html index 93196dbcf..47f427a02 100644 --- a/bookwyrm/templates/get_started/books.html +++ b/bookwyrm/templates/get_started/books.html @@ -6,7 +6,7 @@

{% trans "What are you reading?" %}

- + {% if request.GET.query and not book_results %}

{% blocktrans with query=request.GET.query %}No books found for "{{ query }}"{% endblocktrans %}. {% blocktrans %}You can add books when you start using {{ site_name }}.{% endblocktrans %}

{% endif %} diff --git a/bookwyrm/templates/get_started/users.html b/bookwyrm/templates/get_started/users.html index 4f95882f5..136efe378 100644 --- a/bookwyrm/templates/get_started/users.html +++ b/bookwyrm/templates/get_started/users.html @@ -8,7 +8,7 @@

{% trans "You can follow users on other BookWyrm instances and federated services like Mastodon." %}

- + {% if request.GET.query and no_results %}

{% blocktrans with query=request.GET.query %}No users found for "{{ query }}"{% endblocktrans %}

{% endif %} diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index 0fa4048fa..ff09b9ec2 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -8,7 +8,7 @@
- +