<?php
namespace App\Controller\TelegramBot;
use App\Library\TelegramBot\TelegramObject\Update;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use App\Library\TelegramBot\CandidatesPhotoTelegramBot\CandidatesPhotoTelegramBot;
class CandidatesPhotoTelegramBotController
{
function webhook(Request $request, CandidatesPhotoTelegramBot $telegramBot) {
$post = json_decode($request->getContent(), true);
$update = new Update($post);
$telegramBot->handleUpdate($update);
return new Response();
}
}