diff --git a/js/twister_actions.js b/js/twister_actions.js index c57c7c2..28e90df 100644 --- a/js/twister_actions.js +++ b/js/twister_actions.js @@ -158,6 +158,12 @@ function requestRTs(postLi) function appendPostToContainer(postFromJson, containerToAppend) { + // posts without 'msg' may be used for metadata like 'url' + // and are not meant to be displayed. + if (typeof(postFromJson['userpost']['msg']) === 'undefined' && + typeof(postFromJson['userpost']['rt']) === 'undefined' ) + return; + var newStreamPost = postToElem(postFromJson, "original"); newStreamPost.hide(); containerToAppend.append( newStreamPost ); diff --git a/js/twister_timeline.js b/js/twister_timeline.js index b25ffba..0981aff 100644 --- a/js/twister_timeline.js +++ b/js/twister_timeline.js @@ -347,6 +347,12 @@ function timelineChangedUser() } function willBeHidden(post){ + // posts without 'msg' may be used for metadata like 'url' + // and are not meant to be displayed. + if (typeof(post['userpost']['msg']) === 'undefined' && + typeof(post['userpost']['rt']) === 'undefined' ) + return true; + if (post['userpost']['n'] === defaultScreenName) return false;