]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Comet/updatetimeline.js
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
[quix0rs-gnu-social.git] / plugins / Comet / updatetimeline.js
index e89b3bddf7d3d155d219e0bd03ff1310921bd7c3..170949e9bacaba300783a7590d4474c67d7ab04f 100644 (file)
@@ -54,7 +54,8 @@ var updater = function()
      function makeNoticeItem(data)
      {
           user = data['user'];
-          html = data['html'].replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+          html = data['html'].replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"');
+          source = data['source'].replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"');
 
           ni = "<li class=\"hentry notice\" id=\"notice-"+data['id']+"\">"+
                "<div class=\"entry-title\">"+
@@ -77,9 +78,19 @@ var updater = function()
                "</dl>"+
                "<dl class=\"device\">"+
                "<dt>From</dt> "+
-               "<dd>"+data['source']+"</dd>"+
-               "</dl>"+
-               "</div>"+
+               "<dd>"+source+"</dd>"+ // may have a link, I think
+               "</dl>";
+
+          if (data['in_reply_to_status_id']) {
+               ni = ni+" <dl class=\"response\">"+
+                    "<dt>To</dt>"+
+                    "<dd>"+
+                    "<a href=\""+data['in_reply_to_status_url']+"\" rel=\"in-reply-to\">in reply to</a>"+
+                    "</dd>"+
+                    "</dl>";
+          }
+
+          ni = ni+"</div>"+
                "<div class=\"notice-options\">";
 
           if (_userid != 0) {