Fix: Unseen marker wasn't set / Don't mark activities as unseen
This commit is contained in:
parent
ff1409e626
commit
420bd9bcf9
|
@ -25,6 +25,8 @@ use Friendica\Database\DBA;
|
||||||
use \BadMethodCallException;
|
use \BadMethodCallException;
|
||||||
use Friendica\Database\Database;
|
use Friendica\Database\Database;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
use Friendica\Model\Item;
|
||||||
|
use Friendica\Protocol\Activity;
|
||||||
|
|
||||||
class User
|
class User
|
||||||
{
|
{
|
||||||
|
@ -49,8 +51,8 @@ class User
|
||||||
$fields['uri-id'] = $uri_id;
|
$fields['uri-id'] = $uri_id;
|
||||||
$fields['uid'] = $uid;
|
$fields['uid'] = $uid;
|
||||||
|
|
||||||
// Public posts are always seen
|
// Public posts and activities (like, dislike, ...) are always seen
|
||||||
if ($uid == 0) {
|
if ($uid == 0 || (($data['gravity'] == Item::GRAVITY_ACTIVITY) && ($data['verb'] != Activity::ANNOUNCE))) {
|
||||||
$fields['unseen'] = false;
|
$fields['unseen'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -471,7 +471,7 @@ class Network extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DBA::isResult($items)) {
|
if (DBA::isResult($items)) {
|
||||||
$parents = array_column($items, 'parent-uri-id');
|
$parents = array_column($items, 'uri-id');
|
||||||
} else {
|
} else {
|
||||||
$parents = [];
|
$parents = [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue