Update InternalApiController for ComposeUI v4

This commit is contained in:
Daniel Supernault 2019-08-29 18:07:34 -06:00
parent 58a9ca664c
commit a3ae352fd2
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -240,7 +240,8 @@ class InternalApiController extends Controller
'media.*.license' => 'nullable|string|max:80',
'cw' => 'nullable|boolean',
'visibility' => 'required|string|in:public,private,unlisted|min:2|max:10',
'place' => 'nullable'
'place' => 'nullable',
'comments_disabled' => 'nullable|boolean'
]);
if(config('costar.enabled') == true) {
@ -287,9 +288,15 @@ class InternalApiController extends Controller
if($request->filled('place')) {
$status->place_id = $request->input('place')['id'];
}
if($request->filled('comments_disabled')) {
$status->comments_disabled = $request->input('comments_disabled');
}
$status->caption = strip_tags($request->caption);
$status->scope = 'draft';
$status->profile_id = $profile->id;
$status->save();
foreach($attachments as $media) {