mirror of
https://github.com/QingdaoU/Spirit.git
synced 2025-01-16 01:13:37 +00:00
comment mentions on post_comment_update
This commit is contained in:
parent
29ba271336
commit
645f05c148
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user