src/BotMan.php
public function listen()
    {
        try {
            $isVerificationRequest = $this->verifyServices();

            if (! $isVerificationRequest) {
                $this->fireDriverEvents();

                if ($this->firedDriverEvents === false) {
                    $this->loadActiveConversation();

                    if ($this->loadedConversation === false) {
                        $this->callMatchingMessages();
                    }

                    /*
                     * If the driver has a  "messagesHandled" method, call it.
                     * This method can be used to trigger driver methods
                     * once the messages are handles.
                     */
                    if (method_exists($this->getDriver(), 'messagesHandled')) {
                        $this->getDriver()->messagesHandled();
                    }
                }

                $this->firedDriverEvents = false;
                $this->message = new IncomingMessage('', '', '');
            }
        } catch (\Throwable $e) {
            $this->exceptionHandler->handleException($e, $this);
        }
    }
public function listen()
    {
        try {
            $isVerificationRequest = $this->verifyServices();

            if (! $isVerificationRequest) {
                $this->fireDriverEvents();

                if ($this->firedDriverEvents === false) {
                    $this->loadActiveConversation();

                    if ($this->loadedConversation === false) {
                        $this->callMatchingMessages();
                    }

                    /*
                     * If the driver has a  "messagesHandled" method, call it.
                     * This method can be used to trigger driver methods
                     * once the messages are handles.
                     */
                    if (method_exists($this->getDriver(), 'messagesHandled')) {
                        $this->getDriver()->messagesHandled();
                    }
                }

                $this->firedDriverEvents = false;
                $this->message = new IncomingMessage('', '', '');
            }
        } catch (\Throwable $e) {
            $this->exceptionHandler->handleException($e, $this);
        }
    }
public function listen ( ) { try { $ isVerificationRequest = $ this -> verifyServices ( ) ; if ( ! $ isVerificationRequest ) { $ this -> fireDriverEvents ( ) ; if ( $ this -> firedDriverEvents === false ) { $ this -> loadActiveConversation ( ) ; if ( $ this -> loadedConversation === false ) { $ this -> callMatchingMessages ( ) ; } /*
                     * If the driver has a  "messagesHandled" method, call it.
                     * This method can be used to trigger driver methods
                     * once the messages are handles.
                     */ if ( method_exists ( $ this -> getDriver ( ) , 'messagesHandled' ) ) { $ this -> getDriver ( ) -> messagesHandled ( ) ; } } $ this -> firedDriverEvents = false ; $ this -> message = new IncomingMessage ( '' , '' , '' ) ; } } catch ( \ Throwable $ e ) { $ this -> exceptionHandler -> handleException ( $ e , $ this ) ; } }
Try to match messages with the ones we should
listen to.
Try to match messages with the ones we should listen to .