chatId(); if (! $this->context->bindFromChatId($chatId)) { SafeLog::channel('telegram')->info('telegram AuthorizedChat: chat rejected', [ 'chat_id' => $chatId, 'expected_official' => trim((string) config('coruna.telegram.owner_chat_id', '')), ]); return null; } $type = $bot->chat()?->type; $typeValue = $type instanceof ChatType ? $type->value : (string) $type; if (! in_array($typeValue, [ChatType::GROUP->value, ChatType::SUPERGROUP->value, 'group', 'supergroup'], true)) { SafeLog::channel('telegram')->info('telegram AuthorizedChat: not a group chat', [ 'chat_id' => $chatId, 'type' => $typeValue, ]); return null; } return $next($bot); } }