src/Messages/Conversations/Conversation.php
public function repeat($question = '')
    {
        $conversation = $this->bot->getStoredConversation();

        if (! $question instanceof Question && ! $question) {
            $question = unserialize($conversation['question']);
        }

        $next = $conversation['next'];
        $additionalParameters = unserialize($conversation['additionalParameters']);

        if (is_string($next)) {
            $next = unserialize($next)->getClosure();
        } elseif (is_array($next)) {
            $next = Collection::make($next)->map(function ($callback) {
                if ($this->bot->getDriver()->serializesCallbacks() && ! $this->bot->runsOnSocket()) {
                    $callback['callback'] = unserialize($callback['callback'])->getClosure();
                }

                return $callback;
            })->toArray();
        }
        $this->ask($question, $next, $additionalParameters);
    }
public function repeat($question = '')
    {
        $conversation = $this->bot->getStoredConversation();

        if (! $question instanceof Question && ! $question) {
            $question = unserialize($conversation['question']);
        }

        $next = $conversation['next'];
        $additionalParameters = unserialize($conversation['additionalParameters']);

        if (is_string($next)) {
            $next = unserialize($next)->getClosure();
        } elseif (is_array($next)) {
            $next = Collection::make($next)->map(function ($callback) {
                if ($this->bot->getDriver()->serializesCallbacks() && ! $this->bot->runsOnSocket()) {
                    $callback['callback'] = unserialize($callback['callback'])->getClosure();
                }

                return $callback;
            })->toArray();
        }
        $this->ask($question, $next, $additionalParameters);
    }
public function repeat ( $ question = '' ) { $ conversation = $ this -> bot -> getStoredConversation ( ) ; if ( ! $ question instanceof Question && ! $ question ) { $ question = unserialize ( $ conversation [ 'question' ] ) ; } $ next = $ conversation [ 'next' ] ; $ additionalParameters = unserialize ( $ conversation [ 'additionalParameters' ] ) ; if ( is_string ( $ next ) ) { $ next = unserialize ( $ next ) -> getClosure ( ) ; } elseif ( is_array ( $ next ) ) { $ next = Collection :: make ( $ next ) -> map ( function ( $ callback ) { if ( $ this -> bot -> getDriver ( ) -> serializesCallbacks ( ) && ! $ this -> bot -> runsOnSocket ( ) ) { $ callback [ 'callback' ] = unserialize ( $ callback [ 'callback' ] ) -> getClosure ( ) ; } return $ callback ; } ) -> toArray ( ) ; } $ this -> ask ( $ question , $ next , $ additionalParameters ) ; }
Repeat the previously asked question.
@param string|Question $question
Repeat the previously asked question .