From 420bd9bcf950befc24c561be501489eb5dd3f4f9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 25 Jun 2023 13:33:01 +0000 Subject: [PATCH] Fix: Unseen marker wasn't set / Don't mark activities as unseen --- src/Model/Post/User.php | 6 ++++-- src/Module/Conversation/Network.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Model/Post/User.php b/src/Model/Post/User.php index aba47534a5..e1a9e40b18 100644 --- a/src/Model/Post/User.php +++ b/src/Model/Post/User.php @@ -25,6 +25,8 @@ use Friendica\Database\DBA; use \BadMethodCallException; use Friendica\Database\Database; use Friendica\DI; +use Friendica\Model\Item; +use Friendica\Protocol\Activity; class User { @@ -49,8 +51,8 @@ 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; } diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index d4b766ae26..9e942ea921 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -471,7 +471,7 @@ class Network extends BaseModule } if (DBA::isResult($items)) { - $parents = array_column($items, 'parent-uri-id'); + $parents = array_column($items, 'uri-id'); } else { $parents = []; } -- 2.39.5