hide acitivity notices

This commit is contained in:
Hannes Mannerheim 2014-11-18 00:52:27 +01:00
parent f74912a9b4
commit 525124f1f3
2 changed files with 4 additions and 4 deletions

View File

@ -388,7 +388,7 @@ class QvitterAction extends ApiAction
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.minicolors.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.jWindowCrop.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/load-image.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=26"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=28"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=21"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=12"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=26"></script>

View File

@ -1421,7 +1421,7 @@ function addToFeed(feed, after, extraClasses, isReply) {
&& !isReply) {
// don't show any notices with object_type "activity"
if(typeof obj.notice.uri != 'undefined' && obj.notice.uri.indexOf(':activity:') > -1) {
if(typeof obj.notice != 'undefined' && obj.notice !== null && (obj.notice.uri.indexOf(':activity:') > -1 || obj.notice.uri.indexOf(':favor:') > -1)) {
return true;
}
@ -1581,8 +1581,8 @@ function addToFeed(feed, after, extraClasses, isReply) {
// ordinary tweet
else {
// don't show any notices with object_type "activity"
if(typeof obj.uri != 'undefined' && obj.uri.indexOf(':activity:') > -1) {
// don't show any notices with object_type "activity" or "favor"
if(typeof obj.uri != 'undefined' && (obj.uri.indexOf(':activity:') > -1 || obj.uri.indexOf(':favor:') > -1 )) {
return true;
}