use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Group;
-use Friendica\Model\Item;
use Friendica\Model\Notify\Type;
+use Friendica\Model\Post;
use Friendica\Model\Verb;
use Friendica\Protocol\Activity;
use Friendica\Util\DateTimeFormat;
$condition = ["`unseen` AND `uid` = ? AND NOT `origin` AND (`vid` != ? OR `vid` IS NULL)",
local_user(), Verb::getID(Activity::FOLLOW)];
- $items = Item::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
+ $items = Post::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
if (DBA::isResult($items)) {
- $items_unseen = Item::inArray($items);
+ $items_unseen = Post::toArray($items);
$arr = ['items' => $items_unseen];
Hook::callAll('network_ping', $arr);
do {
$r = q(
- "SELECT `notify`.*, `item`.`visible`, `item`.`deleted`
- FROM `notify` LEFT JOIN `item` ON `item`.`id` = `notify`.`iid`
+ "SELECT `notify`.*, `post-view`.`visible`, `post-view`.`deleted`
+ FROM `notify` LEFT JOIN `post-view` ON `post-view`.`id` = `notify`.`iid`
WHERE `notify`.`uid` = %d AND `notify`.`msg` != ''
AND NOT (`notify`.`type` IN (%d, %d))
AND $seensql `notify`.`seen` ORDER BY `notify`.`date` $order LIMIT %d, 50",