From a83dfc11a0f12d1381acb016c5c5cf404152b7ed Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Thu, 24 Oct 2019 21:43:20 +0200 Subject: [PATCH] Fixing https://github.com/friendica/friendica/pull/7759#discussion_r337102107 --- src/Module/Diaspora/Receive.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Module/Diaspora/Receive.php b/src/Module/Diaspora/Receive.php index 978bccd833..c787b5f970 100644 --- a/src/Module/Diaspora/Receive.php +++ b/src/Module/Diaspora/Receive.php @@ -5,6 +5,7 @@ namespace Friendica\Module\Diaspora; use Friendica\App; use Friendica\BaseModule; use Friendica\Core\Config\Configuration; +use Friendica\Core\L10n\L10n; use Friendica\Model\User; use Friendica\Network\HTTPException; use Friendica\Protocol\Diaspora; @@ -34,7 +35,8 @@ class Receive extends BaseModule $enabled = $config->get('system', 'diaspora_enabled', false); if (!$enabled) { self::$logger->info('Diaspora disabled.'); - throw new HTTPException\InternalServerErrorException('Diaspora disabled.'); + $l10n = self::getClass(L10n::class); + throw new HTTPException\ForbiddenException($l10n->t('Access denied.')); } /** @var App\Arguments $args */ -- 2.39.5