diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 851b792..5fb8fac 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -4483,6 +4483,21 @@ def add_metadata_update_notif(session, obj, messages, user, gitfolder): # Make sure we won't have SQLAlchemy error before we continue session.commit() + REDIS.publish( + 'pagure.%s' % obj.uid, json.dumps({ + 'comment_id': obj_comment.id, + '%s_id' % obj.isa: obj.id, + 'project': obj.project.fullname, + 'comment_added': text2markdown(obj_comment.comment), + 'comment_user': obj_comment.user.user, + 'avatar_url': avatar_url_from_email( + obj_comment.user.default_email, size=16), + 'comment_date': obj_comment.date_created.strftime( + '%Y-%m-%d %H:%M:%S'), + 'notification': True, + }) + ) + if gitfolder: pagure.lib.git.update_git( obj, repo=obj.project, repofolder=gitfolder) diff --git a/pagure/static/issue_ev.js b/pagure/static/issue_ev.js index 1eb0afa..286bb48 100644 --- a/pagure/static/issue_ev.js +++ b/pagure/static/issue_ev.js @@ -131,47 +131,60 @@ remove_deps = function(data, issue_uid, _issue_url) { add_comment = function(data, username) { console.log('Adding comment ' + data.comment_added); var field = $('#comments'); - var _data = '