Skip to content
Snippets Groups Projects
Unverified Commit e641ec78 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

Revert "[FIX] website_forum: notification of comments like answers"

This reverts commit e32ba845.

This commit is wrong as it had an undifined variable and was losing the content
of the comment anyway.

Fixes #12213
parent be91fa4c
No related branches found
No related tags found
No related merge requests found
......@@ -336,10 +336,8 @@ class WebsiteForum(http.Controller):
question = post.parent_id if post.parent_id else post
if kwargs.get('comment') and post.forum_id.id == forum.id:
# TDE FIXME: check that post_id is the question or one of its answers
body = _('<p>A new answer for <i>%s</i> has been posted. <a href="%s/forum/%s/question/%s">Click here to access the post.</a></p>') % \
(question.name, base_url, slug(question.forum_id), slug(question))
post.with_context(mail_create_nosubscribe=True).message_post(
body=body,
body=kwargs.get('comment'),
message_type='comment',
subtype='mt_comment')
return werkzeug.utils.redirect("/forum/%s/question/%s" % (slug(forum), slug(question)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment