diff --git a/catalog/templates/_item_comments.html b/catalog/templates/_item_comments.html
index ca8503f7..61fd2b3d 100644
--- a/catalog/templates/_item_comments.html
+++ b/catalog/templates/_item_comments.html
@@ -33,6 +33,19 @@
{% if forloop.counter <= 10 %}
+ {% if comment.item.class_name == "podcastepisode" %}
+
+
+
+ {% endif %}
{% liked_piece comment as liked %}
{% include 'like_stats.html' with liked=liked piece=comment %}
@@ -55,8 +68,7 @@
{{ comment.mark.action_label }}
- {% if comment.focus_item %}{{ comment.focus_item.title }}{% endif %}
- {% if comment.item != item %}{{ comment.item.title }}{% endif %}
+ {% if comment.item != item %}{{ comment.item.title }}{% endif %}
{{ comment.html|safe }}
{% else %}
diff --git a/catalog/templates/item_mark_list.html b/catalog/templates/item_mark_list.html
index edeea024..e4da00f3 100644
--- a/catalog/templates/item_mark_list.html
+++ b/catalog/templates/item_mark_list.html
@@ -51,9 +51,7 @@
{{ mark.owner.display_name }}
{{ mark.action_label }}
{% if mark.rating_grade %}{{ mark.rating_grade|rating_star }}{% endif %}
- {% if mark.comment.focus_item %}
- {{ mark.comment.focus_item.title }}
- {% endif %}
+ {% if mark.comment.item != item %}{{ mark.comment.item.title }}{% endif %}
diff --git a/social/migrations/0006_alter_localactivity_template.py b/social/migrations/0006_alter_localactivity_template.py
new file mode 100644
index 00000000..70fc04b5
--- /dev/null
+++ b/social/migrations/0006_alter_localactivity_template.py
@@ -0,0 +1,27 @@
+# Generated by Django 4.2.3 on 2023-07-12 21:55
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("social", "0005_alter_localactivity_template"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="localactivity",
+ name="template",
+ field=models.CharField(
+ choices=[
+ ("mark_item", "Markitem"),
+ ("review_item", "Reviewitem"),
+ ("create_collection", "Createcollection"),
+ ("like_collection", "Likecollection"),
+ ("feature_collection", "Featurecollection"),
+ ("comment_child_item", "Commentchilditem"),
+ ],
+ max_length=50,
+ ),
+ ),
+ ]
diff --git a/social/models.py b/social/models.py
index a94aaa2b..bb6024fd 100644
--- a/social/models.py
+++ b/social/models.py
@@ -27,7 +27,6 @@ class ActivityTemplate(models.TextChoices):
LikeCollection = "like_collection"
FeatureCollection = "feature_collection"
CommentChildItem = "comment_child_item"
- CommentFocusItem = "comment_focus_item" # TODO: remove this after migration
class LocalActivity(models.Model, UserOwnedObjectMixin):
@@ -184,20 +183,6 @@ class FeaturedCollectionProcessor(DefaultActivityProcessor):
template = ActivityTemplate.FeatureCollection
-# @DataSignalManager.register
-# class CommentFocusItemProcessor(DefaultActivityProcessor):
-# model = Comment
-# template = ActivityTemplate.CommentFocusItem
-
-# def created(self):
-# if self.action_object.focus_item:
-# super().created()
-
-# def updated(self):
-# if self.action_object.focus_item:
-# super().updated()
-
-
@DataSignalManager.register
class CommentChildItemProcessor(DefaultActivityProcessor):
model = Comment
diff --git a/social/templates/activity/comment_focus_item.html b/social/templates/activity/comment_focus_item.html
deleted file mode 100644
index 1221e1e5..00000000
--- a/social/templates/activity/comment_focus_item.html
+++ /dev/null
@@ -1,75 +0,0 @@
-{% load static %}
-{% load i18n %}
-{% load l10n %}
-{% load admin_url %}
-{% load mastodon %}
-{% load oauth_token %}
-{% load truncate %}
-{% load thumb %}
-{% load prettydate %}
-{% load user_actions %}
-{% load duration %}
-{% wish_item_action activity.action_object.item as action %}
-{% like_piece_action activity.action_object as like_action %}
-
- {% if activity.action_object.metadata.shared_link %}
-
-
-
- {% endif %}
-
- {% liked_piece activity.action_object as liked %}
- {% include 'like_stats.html' with liked=liked piece=activity.action_object %}
-
-
-
-
-
-
-
-
- {% if not action.taken %}
-
-
-
- {% else %}
-
-
-
- {% endif %}
-
-
-
- {{ activity.action_object.mark.action_label }}
-
{{ activity.action_object.focus_item.title }}
- {% if activity.action_object.metadata.position %}
-
{{ activity.action_object.metadata.position|duration_format:1 }}
- {% endif %}
- {% if activity.action_object.mark.rating_grade %}
- {{ activity.action_object.mark.rating_grade | rating_star }}
- {% endif %}
-
-
- {% include "_item_card.html" with item=activity.action_object.item allow_embed=1 %}
- {% if activity.action_object.mark.comment_text %}
-
- {% endif %}
-
diff --git a/users/models.py b/users/models.py
index 9d687f06..0cb2c319 100644
--- a/users/models.py
+++ b/users/models.py
@@ -161,9 +161,10 @@ class User(AbstractUser):
@property
def display_name(self):
return (
- self.mastodon_account.get("display_name")
- if self.mastodon_account
- else (self.username or self.mastodon_acct or "")
+ (self.mastodon_account.get("display_name") if self.mastodon_account else "")
+ or self.username
+ or self.mastodon_acct
+ or ""
)
@property