use \BadMethodCallException;
use Friendica\Database\Database;
use Friendica\DI;
+use Friendica\Model\Item;
+use Friendica\Protocol\Activity;
class User
{
$fields['uri-id'] = $uri_id;
$fields['uid'] = $uid;
- // Public posts are always seen
- if ($uid == 0) {
+ // Public posts and activities (like, dislike, ...) are always seen
+ if ($uid == 0 || (($data['gravity'] == Item::GRAVITY_ACTIVITY) && ($data['verb'] != Activity::ANNOUNCE))) {
$fields['unseen'] = false;
}
}
if (DBA::isResult($items)) {
- $parents = array_column($items, 'parent-uri-id');
+ $parents = array_column($items, 'uri-id');
} else {
$parents = [];
}