]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Home.php
Decouple conversation creation from rendering
[friendica.git] / src / Module / Home.php
index 06bfa5eba576aca4a22ceb88c348d0e9f1ce6864..fbba889a883af7839d36b7999a3e719d08536820 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -25,13 +25,22 @@ use Friendica\BaseModule;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
 use Friendica\DI;
+use Friendica\Model\User;
 use Friendica\Module\Security\Login;
+use Friendica\Protocol\ActivityPub;
 
 /**
  * Home module - Landing page of the current node
  */
 class Home extends BaseModule
 {
+       protected function rawContent(array $request = [])
+       {
+               if (ActivityPub::isRequest()) {
+                       DI::baseUrl()->redirect(User::getActorName());
+               }
+       }
+
        protected function content(array $request = []): string
        {
                $app = DI::app();
@@ -60,7 +69,7 @@ class Home extends BaseModule
                        $customHome = $homeFilePath;
 
                        if (file_exists($cssFilePath)) {
-                               DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/home.css' . '" media="all" />';
+                               DI::page()->registerStylesheet('home.css', 'all');
                        }
                }