plugin hook for update_unseen

This commit is contained in:
zotlabs
2017-08-01 22:25:55 -07:00
parent 01526a9a79
commit 9359f9fe4d
5 changed files with 38 additions and 13 deletions

View File

@@ -358,9 +358,13 @@ class Channel extends \Zotlabs\Web\Controller {
}
if($is_owner && $update_unseen) {
$r = q("UPDATE item SET item_unseen = 0 where item_unseen = 1 and item_wall = 1 AND uid = %d $update_unseen",
intval(local_channel())
);
$x = [ 'channel_id' => local_channel(), 'update' => 'unset' ];
call_hooks('update_unseen',$x);
if($x['update'] === 'unset' || intval($x['update'])) {
$r = q("UPDATE item SET item_unseen = 0 where item_unseen = 1 and item_wall = 1 AND uid = %d $update_unseen",
intval(local_channel())
);
}
}