]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Unseen marker wasn't set / Don't mark activities as unseen
authorMichael <heluecht@pirati.ca>
Sun, 25 Jun 2023 13:33:01 +0000 (13:33 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 25 Jun 2023 13:33:01 +0000 (13:33 +0000)
src/Model/Post/User.php
src/Module/Conversation/Network.php

index aba47534a5da769dcdca827bffecdc95176b71c1..e1a9e40b18cd9a7745c67a50d641140305f65309 100644 (file)
@@ -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;
                }
 
index d4b766ae260020aa93c585d9fd463221505ec62d..9e942ea9216f8e35297d60886a9f348563f4d673 100644 (file)
@@ -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 = [];
                }