]> git.mxchange.org Git - friendica.git/commitdiff
Don't set posts to seen on channel ping
authorMichael <heluecht@pirati.ca>
Tue, 2 Apr 2024 21:30:07 +0000 (21:30 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 Apr 2024 21:31:57 +0000 (21:31 +0000)
src/Module/Conversation/Network.php
src/Module/Conversation/Timeline.php
src/Module/Ping/Network.php

index 806f958a0d8bba6ff9dbfa352ac52e32e4637774..6f0a805f82d51b1ffd78b81504854850072323fb 100644 (file)
@@ -378,6 +378,11 @@ class Network extends Timeline
                }
        }
 
+       protected function setPing(bool $ping)
+       {
+               $this->ping = $ping;
+       }
+
        protected function getItems()
        {
                $conditionFields  = ['uid' => $this->session->getLocalUserId()];
index 70491e9d2bec7bfd7bf4798d9a1bebeb5729878c..ed60457ab1f1f169e3bda7d6a6c17056b38f07d4 100644 (file)
@@ -71,6 +71,8 @@ class Timeline extends BaseModule
        /** @var bool */
        protected $update;
        /** @var bool */
+       protected $ping;
+       /** @var bool */
        protected $raw;
        /** @var string */
        protected $order;
@@ -823,7 +825,7 @@ class Timeline extends BaseModule
         */
        protected function setItemsSeenByCondition(array $condition)
        {
-               if (empty($condition)) {
+               if (empty($condition) || $this->ping) {
                        return;
                }
 
index 9eec3b366ab69adb19022f80d8e440c1777c559b..cf6706370e74026d6c38e8e4b316e19c401ad5a6 100644 (file)
@@ -46,6 +46,7 @@ class Network extends NetworkModule
                        System::httpExit('');
                }
 
+               $this->setPing(true);
                $this->itemsPerPage = 100;
 
                if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {