filter by item_notshown instead of obj_type

This commit is contained in:
git-marijus 2017-07-28 23:07:16 +02:00
parent 9717d4502f
commit 4585e35b3e
2 changed files with 4 additions and 5 deletions

View File

@ -534,13 +534,13 @@ class Network extends \Zotlabs\Web\Controller {
if($parents_str) { if($parents_str) {
$update_unseen = " AND ( id IN ( " . dbesc($parents_str) . " )"; $update_unseen = " AND ( id IN ( " . dbesc($parents_str) . " )";
$update_unseen .= " AND obj_type != " . dbesc(ACTIVITY_OBJ_FILE) . "" $update_unseen .= " AND item_notshown = 0";
$update_unseen .= " OR ( parent IN ( " . dbesc($parents_str) . " ) AND verb in ( '" . dbesc(ACTIVITY_LIKE) . "','" . dbesc(ACTIVITY_DISLIKE) . "' ))) "; $update_unseen .= " OR ( parent IN ( " . dbesc($parents_str) . " ) AND verb in ( '" . dbesc(ACTIVITY_LIKE) . "','" . dbesc(ACTIVITY_DISLIKE) . "' ))) ";
} }
} }
else { else {
if($parents_str) { if($parents_str) {
$update_unseen = " AND parent IN ( " . dbesc($parents_str) . " ) AND obj_type != " . dbesc(ACTIVITY_OBJ_FILE) . ""; $update_unseen = " AND parent IN ( " . dbesc($parents_str) . " ) AND item_notshown = 0";
} }
} }
} }

View File

@ -401,10 +401,9 @@ class Ping extends \Zotlabs\Web\Controller {
WHERE item_unseen = 1 and uid = %d WHERE item_unseen = 1 and uid = %d
$item_normal $item_normal
AND author_xchan != '%s' AND author_xchan != '%s'
AND obj_type != '%s'", AND item_notshown = 0",
intval(local_channel()), intval(local_channel()),
dbesc($ob_hash), dbesc($ob_hash)
dbesc(ACTIVITY_OBJ_FILE)
); );
if($r) { if($r) {