return $channel->toJson();
}
+ public function chatSettings(Request $request, Channel $channel) {
+ if (!$channel->twitch_chat) {
+ throw new \Exception('channel has no twitch chat set');
+ }
+ $validatedData = $request->validate([
+ 'wait_msgs_min' => 'integer|min:1',
+ 'wait_msgs_max' => 'integer',
+ 'wait_time_min' => 'integer',
+ 'wait_time_max' => 'integer',
+ ]);
+ $this->authorize('editRestream', $channel);
+ $channel->chat_settings = $validatedData;
+ $channel->save();
+ return $channel->toJson();
+ }
+
public function join(Request $request, Channel $channel) {
if (!$channel->twitch_chat) {
throw new \Exception('channel has no twitch chat set');