From 0fc307803219117553f74600dc8972eb85761f1f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 31 2016 09:05:24 +0000 Subject: Let the notifications render correctly when added by the SSE server Currently the notifications when added to the page by the SSE server are not rendered properly, we basically see the markdown not the desired html with this change that is no longer the case. fixes https://pagure.io/pagure/issue/1389 --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 540b1ec..713a75e 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -888,9 +888,7 @@ def add_pull_request_comment(session, request, commit, tree_id, filename, # Send notification for the event-source server if REDIS: - comment_text = pr_comment.comment - if not notification: - comment_text = text2markdown(pr_comment.comment) + comment_text = text2markdown(pr_comment.comment) REDIS.publish('pagure.%s' % request.uid, json.dumps({ 'request_id': request.id, diff --git a/pagure/static/request_ev.js b/pagure/static/request_ev.js index d59f0e3..239e72f 100644 --- a/pagure/static/request_ev.js +++ b/pagure/static/request_ev.js @@ -17,11 +17,11 @@ add_comment = function(data, username) { var _data = '
\
\
\ - ' + emojione.toImage(data.comment_added) + '\
\ \ Just now
\ -
\ +
\ + ' + emojione.toImage(data.comment_added) + '\
\ ';