X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fping.php;h=3dab119700dcfeb70b322526d9989a470e2154e0;hb=f58d42e317cbf323fb2c802a0cb71a4799863008;hp=70c580d3d31ff4f5c7385ee8125789d15334a2b3;hpb=db9f75fbdb3ebc10d70c39880a3c3885654fda77;p=friendica.git diff --git a/mod/ping.php b/mod/ping.php index 70c580d3d3..3dab119700 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -1,6 +1,22 @@ . + * */ use Friendica\App; @@ -13,6 +29,8 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Model\Item; +use Friendica\Model\Notify\Type; +use Friendica\Protocol\Activity; use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; use Friendica\Util\Proxy as ProxyUtils; @@ -117,9 +135,10 @@ function ping_init(App $a) $notifs = ping_get_notifications(local_user()); - $condition = ["`unseen` AND `uid` = ? AND `contact-id` != ?", local_user(), local_user()]; + $condition = ["`unseen` AND `uid` = ? AND `contact-id` != ? AND (`activity` != ? OR `activity` IS NULL)", + local_user(), local_user(), Item::activityToIndex(Activity::FOLLOW)]; $fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar', - 'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid', 'wall']; + 'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid', 'wall', 'activity']; $params = ['order' => ['received' => true]]; $items = Item::selectForUser(local_user(), $fields, $condition, $params); @@ -403,8 +422,8 @@ function ping_get_notifications($uid) AND NOT (`notify`.`type` IN (%d, %d)) AND $seensql `notify`.`seen` ORDER BY `notify`.`date` $order LIMIT %d, 50", intval($uid), - intval(NOTIFY_INTRO), - intval(NOTIFY_MAIL), + intval(Type::INTRO), + intval(Type::MAIL), intval($offset) );