diff options
author | Joas Schilling <coding@schilljs.com> | 2024-03-14 14:58:06 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-03-14 15:32:56 +0100 |
commit | 84e3e69ece23d13b8f895b77339565ab8132981c (patch) | |
tree | 1046b600dc6af125451f2d8151a73020f86e6dcf /lib | |
parent | 8b1f7915ba0cdf5fdb29cebbafd9186bb799f29d (diff) |
fix(federation): Proxy all requests with the users language
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Federation/Proxy/TalkV1/ProxyRequest.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Federation/Proxy/TalkV1/ProxyRequest.php b/lib/Federation/Proxy/TalkV1/ProxyRequest.php index 548553867..ca21dabea 100644 --- a/lib/Federation/Proxy/TalkV1/ProxyRequest.php +++ b/lib/Federation/Proxy/TalkV1/ProxyRequest.php @@ -35,6 +35,8 @@ use OCP\AppFramework\Http; use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; use OCP\IConfig; +use OCP\IUserSession; +use OCP\L10N\IFactory; use Psr\Log\LoggerInterface; use SensitiveParameter; @@ -43,6 +45,8 @@ class ProxyRequest { protected IConfig $config, protected IClientService $clientService, protected LoggerInterface $logger, + protected IFactory $l10nFactory, + protected IUserSession $userSession, ) { } @@ -72,6 +76,7 @@ class ProxyRequest { 'Accept' => 'application/json', 'X-Nextcloud-Federation' => 'true', 'OCS-APIRequest' => 'true', + 'Accept-Language' => $this->l10nFactory->getUserLanguage($this->userSession->getUser()), ], 'timeout' => 5, ]; |