@@ -319,6 +319,7 @@ public function handleGetUpdatesCore($offset, $limit = null, $timeout = null)
319319 if ($ response ->isOk ()) {
320320 //Process all updates
321321 foreach ((array ) $ response ->getResult () as $ result ) {
322+ print ($ result );
322323 $ this ->processUpdate ($ result );
323324 }
324325 }
@@ -374,11 +375,8 @@ public function processUpdate(Update $update)
374375 $ update_type = $ this ->update ->getUpdateType ();
375376
376377 if ($ update_type === 'channel_post ' ) {
377- return Request::emptyResponse ();
378- }
379-
380-
381- if (in_array ($ update_type , ['inline_query ' , 'chosen_inline_result ' , 'callback_query ' , 'edited_message ' ])) {
378+ $ command = $ this ->getCommandFromType ($ update_type );
379+ } elseif (in_array ($ update_type , ['inline_query ' , 'chosen_inline_result ' , 'callback_query ' , 'edited_message ' ])) {
382380 $ command = $ this ->getCommandFromType ($ update_type );
383381 } elseif ($ update_type === 'message ' ) {
384382 $ message = $ this ->update ->getMessage ();
@@ -413,7 +411,9 @@ public function processUpdate(Update $update)
413411 //This is necessary to "require" all the necessary command files!
414412 $ this ->getCommandsList ();
415413
416- DB ::insertRequest ($ this ->update );
414+ if ($ update_type !== 'channel_post ' ) {
415+ DB ::insertRequest ($ this ->update );
416+ }
417417
418418 return $ this ->executeCommand ($ command );
419419 }
0 commit comments