summaryrefslogtreecommitdiffstats
path: root/activities
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-28 22:34:03 -0700
committerAndrew Godwin2022-11-28 22:34:03 -0700
commit4420507f62bffd38ed9e8ce31a11fa002756143d (patch)
treeaee481716ec8aa59d9bcd7f82bfe8ea94c444c25 /activities
parent0bced8fe174de24ebd3823c93997cb2d2347dfe9 (diff)
downloadtakahe-4420507f62bffd38ed9e8ce31a11fa002756143d.tar.gz
takahe-4420507f62bffd38ed9e8ce31a11fa002756143d.tar.bz2
takahe-4420507f62bffd38ed9e8ce31a11fa002756143d.zip
Show parent post on individual page
Diffstat (limited to 'activities')
-rw-r--r--activities/views/posts.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/activities/views/posts.py b/activities/views/posts.py
index 9935205..6dbfc8e 100644
--- a/activities/views/posts.py
+++ b/activities/views/posts.py
@@ -41,6 +41,10 @@ class Individual(TemplateView):
return super().get(request)
def get_context_data(self):
+ if self.post_obj.in_reply_to:
+ parent = Post.objects.filter(object_uri=self.post_obj.in_reply_to).first()
+ else:
+ parent = None
return {
"identity": self.identity,
"post": self.post_obj,
@@ -49,6 +53,7 @@ class Individual(TemplateView):
self.request.identity,
),
"link_original": True,
+ "parent": parent,
"replies": Post.objects.filter(
models.Q(
visibility__in=[