]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/DFRN/Poll.php
Merge remote-tracking branch 'upstream/develop' into server-detection
[friendica.git] / src / Module / DFRN / Poll.php
index 3c4becdd6bc9eb1a8405337554f3348d8af0bf81..e41dafed56f2c2d90d2d7017024fe86135a54d07 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,8 @@
 namespace Friendica\Module\DFRN;
 
 use Friendica\BaseModule;
+use Friendica\Core\System;
+use Friendica\Module\Response;
 use Friendica\Protocol\OStatus;
 
 /**
@@ -29,11 +31,9 @@ use Friendica\Protocol\OStatus;
  */
 class Poll extends BaseModule
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
-               header("Content-type: application/atom+xml");
-               $last_update = $_GET['last_update'] ?? '';
-               echo OStatus::feed(static::$parameters['nickname'], $last_update, 10);
-               exit();
+               $last_update = $request['last_update'] ?? '';
+               System::httpExit(OStatus::feed($this->parameters['nickname'], $last_update, 10) ?? '', Response::TYPE_ATOM);
        }
 }