Update ComposeController, bail on empty attachments

This commit is contained in:
Daniel Supernault 2021-05-20 20:26:26 -06:00
parent 29947e157c
commit 061b145b54
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -480,6 +480,8 @@ class ComposeController extends Controller
array_push($mimes, $m->mime);
}
abort_if(empty($attachments), 422);
$mediaType = StatusController::mimeTypeCheck($mimes);
if(in_array($mediaType, ['photo', 'video', 'photo:album']) == false) {