diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 351df66..49adaa8 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -192,7 +192,7 @@ def add_issue_comment(session, issue, comment, user, ticketfolder, })) else: redis.publish(issue.uid, json.dumps({ - 'comment_id': len(issue.comments), + 'comment_id': issue_comment.id, 'comment_added': text2markdown(issue_comment.comment), 'comment_user': issue_comment.user.user, 'avatar_url': avatar_url(issue_comment.user.user, size=16), diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index a08d85b..717230c 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -126,7 +126,7 @@
{% if issue.comments %} {% for comment in issue.comments %} - {{ show_comment(comment, loop.index, repo, username, issueid, form, repo_admin) }} + {{ show_comment(comment, comment.id, repo, username, issueid, form, repo_admin) }} {% endfor %} {% endif %}