From bdc65cc2435bcbcfeeb508d73836a0bb69715b3f Mon Sep 17 00:00:00 2001 From: erqan Date: Wed, 25 Jun 2014 16:54:14 +0300 Subject: [PATCH] removed Retransmit button from spam posts (https://github.com/miguelfreitas/twister-core/issues/15#issuecomment-47088142) --- js/twister_formatpost.js | 5 ++++- js/twister_timeline.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index 5b40934..87b6d16 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -6,7 +6,7 @@ // format "userpost" to html element // kind = "original"/"ancestor"/"descendant" -function postToElem( post, kind ) { +function postToElem( post, kind, promoted ) { /* "userpost" : { @@ -116,6 +116,9 @@ function postToElem( post, kind ) { retweetedByElem.text('@'+retweeted_by); } + if (typeof(promoted) !== 'undefined' && promoted) + elem.find('.post-propagate').remove(); + return elem; } diff --git a/js/twister_timeline.js b/js/twister_timeline.js index f332f0d..ba3b3fe 100644 --- a/js/twister_timeline.js +++ b/js/twister_timeline.js @@ -149,7 +149,7 @@ function processReceivedPosts(req, posts) continue; } - var streamPost = postToElem(post, "original"); + var streamPost = postToElem(post, "original", req.getspam); var timePost = post["userpost"]["time"]; streamPost.attr("data-time",timePost);