comment mentions on post_comment_update

This commit is contained in:
nitely 2017-03-23 23:57:27 -03:00
parent 29ba271336
commit 645f05c148
2 changed files with 5 additions and 2 deletions

View File

@ -21,8 +21,11 @@ def pre_comment_update(comment):
CommentHistory.create_maybe(comment)
def post_comment_update(comment):
def post_comment_update(comment, mentions=None):
comment.increase_modified_count()
comment.comment_html = post_render_static_polls(comment)
CommentHistory.create(comment)
TopicNotification.notify_new_mentions(
comment=comment, mentions=mentions)

View File

@ -68,7 +68,7 @@ def update(request, pk):
if form.is_valid():
pre_comment_update(comment=Comment.objects.get(pk=comment.pk))
comment = form.save()
post_comment_update(comment=comment)
post_comment_update(comment=comment, mentions=form.mentions)
return redirect(request.POST.get('next', comment.get_absolute_url()))
else:
form = CommentForm(instance=comment)