]> git.localhorst.tv Git - alttp.git/blobdiff - app/Http/Controllers/ChannelController.php
configurable min age and message source
[alttp.git] / app / Http / Controllers / ChannelController.php
index 15213b412f675481ca86d854a4ecbf1579f0dfc6..026b9aa8ce9fe18c7d0978be820fc1e911c12018 100644 (file)
@@ -71,7 +71,7 @@ class ChannelController extends Controller {
        public function chatBotLog(Request $request, Channel $channel) {
                $this->authorize('editRestream', $channel);
                $log = $channel->chat_bot_logs()
-                       ->with('origin')
+                       ->with(['origin', 'user'])
                        ->orderBy('created_at', 'DESC')
                        ->limit(150)
                        ->get();
@@ -84,9 +84,11 @@ class ChannelController extends Controller {
                }
                $validatedData = $request->validate([
                        'language' => 'string|in:de,en,es,fr',
+                       'min_age' => 'integer|min:1',
                        'respond' => 'string|in:50,no,yes',
+                       'source' => 'string|in:any,cat,catchan,chan',
                        'wait_msgs_min' => 'integer|min:1',
-                       'wait_msgs_max' => 'integer',
+                       'wait_msgs_max' => 'integer|min:1',
                        'wait_time_min' => 'integer',
                        'wait_time_max' => 'integer',
                ]);