From 5e1c3e10ac282b43d5edcf80d3b2a1e40836057a Mon Sep 17 00:00:00 2001 From: fenwick67 Date: Mon, 1 May 2017 22:30:42 -0500 Subject: [PATCH] don't show deleted toots --- lib/convert.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/convert.js b/lib/convert.js index 8654186..23cbdc6 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -77,7 +77,7 @@ function buildUp(jsonObj,opts){ jsonObj.opts = opts||{}; // iterate through the items - jsonObj.items.forEach(function(item){ + jsonObj.items = jsonObj.items.filter(function(item){ // get date item.stringDate = getTimeDisplay(item.date); @@ -146,6 +146,12 @@ function buildUp(jsonObj,opts){ } }); + if (!item.content || item.title.toLowerCase().indexOf('delete') > -1){// item was deleted + return false; + }else{ + return true; + } + }); return template(jsonObj);