mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-10 12:39:38 +02:00
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* @copyright 2022 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace Config;
|
|
|
|
use App\Libraries\NoteObject;
|
|
use Modules\Fediverse\Config\Fediverse as FediverseBaseConfig;
|
|
|
|
class Fediverse extends FediverseBaseConfig
|
|
{
|
|
/**
|
|
* --------------------------------------------------------------------
|
|
* ActivityPub Objects
|
|
* --------------------------------------------------------------------
|
|
*/
|
|
public string $noteObject = NoteObject::class;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
$defaultBanner = config('Images')
|
|
->podcastBannerDefaultPaths[service('settings')->get('App.theme')] ?? config(
|
|
'Images'
|
|
)->podcastBannerDefaultPaths['default'];
|
|
|
|
['dirname' => $dirname, 'extension' => $extension, 'filename' => $filename] = pathinfo(
|
|
$defaultBanner['path']
|
|
);
|
|
$defaultBannerPath = $filename;
|
|
if ($dirname !== '.') {
|
|
$defaultBannerPathList = [$dirname, $filename];
|
|
$defaultBannerPath = implode('/', $defaultBannerPathList);
|
|
}
|
|
|
|
helper('media');
|
|
|
|
$this->defaultCoverImagePath = media_path($defaultBannerPath . '_federation.' . $extension);
|
|
$this->defaultCoverImageMimetype = $defaultBanner['mimetype'];
|
|
}
|
|
}
|