Browse Source

Merge pull request #6028 from pixelfed/staging

Update ComposeController, add addl compose settings data
(dan)iel (sup)ernault 1 month ago
parent
commit
840fa06bf9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Http/Controllers/ComposeController.php

+ 3 - 0
app/Http/Controllers/ComposeController.php

@@ -781,8 +781,11 @@ class ComposeController extends Controller
         abort_if($request->user()->has_roles && ! UserRoleService::can('can-post', $request->user()->id), 403, 'Invalid permissions for this action');
 
         $default = [
+            'allowed_media_types' => config_cache('pixelfed.media_types'),
+            'max_caption_length' => (int) config_cache('pixelfed.max_caption_length'),
             'default_license' => 1,
             'media_descriptions' => false,
+            'max_file_size' => config_cache('pixelfed.max_photo_size'),
             'max_media_attachments' => (int) config_cache('pixelfed.max_album_length'),
             'max_altext_length' => config_cache('pixelfed.max_altext_length'),
         ];