From f0d917600b0520b1db826d11f465535c9c5237cf Mon Sep 17 00:00:00 2001 From: Matteo Gheza Date: Sun, 8 Oct 2023 12:31:34 +0200 Subject: [PATCH] Fix Telegram bot Sentry setUser --- backend/app/Telegram/WebhookController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/Telegram/WebhookController.php b/backend/app/Telegram/WebhookController.php index 8ec7bfd..b48587b 100644 --- a/backend/app/Telegram/WebhookController.php +++ b/backend/app/Telegram/WebhookController.php @@ -34,7 +34,7 @@ class WebhookController extends $this->user = null; } - if(app()->bound('sentry')) { + if($this->user && app()->bound('sentry')) { \Sentry\configureScope(function (Scope $scope): void { $scope->setUser([ 'id' => $this->user->id,