Update SettingsController

This commit is contained in:
Daniel Supernault 2022-02-08 03:30:05 -07:00
parent 119077829d
commit f363a3275a
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 3 additions and 1 deletions

View File

@ -257,7 +257,9 @@ class SettingsController extends Controller
public function mediaSettings(Request $request)
{
$setting = UserSetting::whereUserId($request->user()->id)->firstOrFail();
$compose = $setting->compose_settings ? json_decode($setting->compose_settings, true) : [
$compose = $setting->compose_settings ? (
is_string($setting->compose_settings) ? json_decode($setting->compose_settings, true) : $setting->compose_settings
) : [
'default_license' => null,
'media_descriptions' => false
];