Advertisement
MyZik

Untitled

Jun 17th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1.     /**
  2.      * @param CallbackQuery $query
  3.      * @return \Longman\TelegramBot\Entities\ServerResponse
  4.      * @throws \Longman\TelegramBot\Exception\TelegramException
  5.      */
  6.     public function answer(CallbackQuery $query) {
  7.         $callback_data = $query->getData();
  8.         $chat_id = $query->getMessage()->getChat()->getId();
  9.         $user_id = $query->getFrom()->getId();
  10.         $pdo = DB::getPdo();
  11.  
  12.         if (strpos($callback_data, 'feedback_') !== 0) {
  13.             return Request::emptyResponse();
  14.         }
  15.  
  16.         $current = substr($callback_data, strlen('feedback_')); // Feedback ID
  17.  
  18.         $conversation = new Conversation($user_id, $chat_id, $this->getName());
  19.         $conversation->notes['state'] = 'message';
  20.         $conversation->update();
  21.  
  22.         /**
  23.          * TODO
  24.          */
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement