]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Magic.php
Merge pull request #11936 from annando/youtube-shorts
[friendica.git] / src / Module / Magic.php
index 10c30c57a0ec2dd8159aa35cff83923fc375c20e..e4ed1e93bf08138a4346d6262eccbe6d08f2e05f 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
  *
@@ -29,6 +29,7 @@ use Friendica\Database\Database;
 use Friendica\Model\Contact;
 use Friendica\Model\User;
 use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
 use Friendica\Network\HTTPClient\Client\HttpClientOptions;
 use Friendica\Util\HTTPSignature;
 use Friendica\Util\Profiler;
@@ -49,9 +50,9 @@ class Magic extends BaseModule
        /** @var ICanSendHttpRequests */
        protected $httpClient;
 
-       public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Database $dba, ICanSendHttpRequests $httpClient, array $server, array $parameters = [])
+       public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Database $dba, ICanSendHttpRequests $httpClient, array $server, array $parameters = [])
        {
-               parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $server, $parameters);
+               parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 
                $this->app        = $app;
                $this->dba        = $dba;
@@ -112,7 +113,7 @@ class Magic extends BaseModule
                        );
 
                        // Try to get an authentication token from the other instance.
-                       $curlResult = $this->httpClient->get($basepath . '/owa', [HttpClientOptions::HEADERS => $header]);
+                       $curlResult = $this->httpClient->get($basepath . '/owa', HttpClientAccept::DEFAULT, [HttpClientOptions::HEADERS => $header]);
 
                        if ($curlResult->isSuccess()) {
                                $j = json_decode($curlResult->getBody(), true);