1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00

Update CommentController

This commit is contained in:
Daniel Supernault 2019-05-12 22:35:54 -06:00
parent 7974ad39c9
commit 93aa65d123
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -43,8 +43,8 @@ class CommentController extends Controller
abort(403);
}
$this->validate($request, [
'item' => 'required|integer',
'comment' => 'required|string|max:500',
'item' => 'required|integer|min:1',
'comment' => 'required|string|max:'.(int) config('pixelfed.max_caption_length'),
]);
$comment = $request->input('comment');
$statusId = $request->item;
@ -57,8 +57,6 @@ class CommentController extends Controller
return;
}
Cache::forget('transform:status:'.$status->url());
$reply = DB::transaction(function() use($comment, $status, $profile) {
$autolink = Autolink::create()->autolink($comment);
$reply = new Status();