danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 157 forks source link

content_object is missing in followup notification #377

Closed JanMalte closed 2 years ago

JanMalte commented 2 years ago

For any reasons the content_object is commented out in the followup notification email context.

        message_context = {'user_name': name,
                           'comment': comment,
                           # 'content_object': target,
                           'mute_url': mute_url,
                           'site': comment.site}

https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/views.py#L287:L291

This leads to an empty field in the email and an incomplete comment URL

Post: {{ content_object.title }}
URL:  http://{{ site.domain }}{{ content_object.get_absolute_url }}

https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/templates/django_comments_xtd/email_followup_comment.txt#L6:L7