mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-23 13:00:46 +00:00
Update CommentController
This commit is contained in:
parent
7974ad39c9
commit
93aa65d123
1 changed files with 2 additions and 4 deletions
|
@ -43,8 +43,8 @@ class CommentController extends Controller
|
||||||
abort(403);
|
abort(403);
|
||||||
}
|
}
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'item' => 'required|integer',
|
'item' => 'required|integer|min:1',
|
||||||
'comment' => 'required|string|max:500',
|
'comment' => 'required|string|max:'.(int) config('pixelfed.max_caption_length'),
|
||||||
]);
|
]);
|
||||||
$comment = $request->input('comment');
|
$comment = $request->input('comment');
|
||||||
$statusId = $request->item;
|
$statusId = $request->item;
|
||||||
|
@ -57,8 +57,6 @@ class CommentController extends Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache::forget('transform:status:'.$status->url());
|
|
||||||
|
|
||||||
$reply = DB::transaction(function() use($comment, $status, $profile) {
|
$reply = DB::transaction(function() use($comment, $status, $profile) {
|
||||||
$autolink = Autolink::create()->autolink($comment);
|
$autolink = Autolink::create()->autolink($comment);
|
||||||
$reply = new Status();
|
$reply = new Status();
|
||||||
|
|
Loading…
Reference in a new issue