- logger('Tagged items: ' . count($data) . ' - ' . $bottom_limit . ' - ' . $top_limit . ' - ' . local_user()); //$last_date);
- $r = array_merge($data, $r);
+ $tag_top_limit = current($data)['order_date'];
+ if ($_SESSION['network_last_date'] < $tag_top_limit) {
+ $_SESSION['network_last_date'] = $tag_top_limit;
+ }
+
+ logger('Tagged items: ' . count($data) . ' - ' . $bottom_limit . ' - ' . $top_limit . ' - ' . local_user().' - '.(int)$update);
+ $s = [];
+ foreach ($r as $item) {
+ $s[$item['uri']] = $item;
+ }
+ foreach ($data as $item) {
+ // Don't show hash tag posts from blocked or ignored contacts
+ $condition = ["`nurl` = ? AND `uid` = ? AND (`blocked` OR `readonly`)",
+ normalise_link($item['author-link']), local_user()];
+ if (!DBA::exists('contact', $condition)) {
+ $s[$item['uri']] = $item;
+ }
+ }
+ $r = $s;