1
0

Fix resubscribtions

This commit is contained in:
2020-04-30 15:07:21 +02:00
parent 9f208b312d
commit 2fb921f3ba

View File

@@ -33,7 +33,7 @@ class Kernel extends ConsoleKernel
$hooks = TwitchWebhook::where("disabled", false)->where("disabled_at", null)->whereDate("expires_at", "<=", Carbon::now()->addHour())->get();
foreach ($hooks as $hook) {
$subscription = Twitch::subscribeWebhook($hook->callback, $hook->type, WebhookController::MAX_LEASE_SECONDS);
$subscription = Twitch::subscribeWebhook($hook->callback, $hook->topic, WebhookController::MAX_LEASE_SECONDS);
if ($subscription->success) {
$hook->expires_at = Carbon::now()->addSeconds(WebhookController::MAX_LEASE_SECONDS);