]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Update/Community.php
Merge remote-tracking branch 'upstream/develop' into user-defined-channels
[friendica.git] / src / Module / Update / Community.php
index f42274953d83e93cd228153e5df6c8360eb53302..05ea8f828c8292e7d10785dd982cb345116f40e0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 
 namespace Friendica\Module\Update;
 
+use Friendica\Content\Conversation;
 use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Module\Conversation\Community as CommunityModule;
@@ -33,13 +34,13 @@ use Friendica\Module\Conversation\Community as CommunityModule;
  */
 class Community extends CommunityModule
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
-               self::parseRequest();
+               $this->parseRequest($request);
 
                $o = '';
-               if (!empty($_GET['force']) || !DI::pConfig()->get(local_user(), 'system', 'no_auto_update')) {
-                       $o = DI::conversation()->create(self::getItems(), 'community', true, false, 'commented', local_user());
+               if ($this->update || $this->force) {
+                       $o = DI::conversation()->render($this->getCommunityItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
                }
 
                System::htmlUpdateExit($o);