src/VkCommunityCallbackDriver.php
/**
     * Setting the driver event via payload
     * as we need to get type of the event.
     * Example data:
     * {"type": "group_join", "object": {"user_id": 1, "join_type" : "approved"}, "group_id": 1}
     * {"type": "confirmation", "group_id": 1}
     *
     * @return DriverEventInterface|bool
     */
Setting the driver event via payload
as we need to get type of the event.


Setting the driver event via payload as we need to get type of the event .
public function hasMatchingEvent() {
        $check =    $this->payload->get("secret") == $this->config->get("secret") &&
            $this->payload->get("group_id") == $this->config->get("group_id");
        if (!is_null($this->payload) && $check) {
            $this->driverEvent = $this->getEventFromEventData($this->payload);
            switch ($this->driverEvent->getName()){
                case "message_new":
                case "message_edit":
                case "message_reply":
                    return true;
                    break;
            }
            return $this->driverEvent;
        }
        return false;
    }
public function hasMatchingEvent ( ) { $ check = $ this -> payload -> get ( " secret " ) == $ this -> config -> get ( " secret " ) && $ this -> payload -> get ( " group_id " ) == $ this -> config -> get ( " group_id " ) ; if ( ! is_null ( $ this -> payload ) && $ check ) { $ this -> driverEvent = $ this -> getEventFromEventData ( $ this -> payload ) ; switch ( $ this -> driverEvent -> getName ( ) ) { case " message_new " : case " message_edit " : case " message_reply " : return true ; break ; } return $ this -> driverEvent ; } return false ; }
Setting the driver event via payload
 as we need to get type of the event.
Setting the driver event via payload as we need to get type of the event .
// Check if VK request // Ignore incoming messages (used by Botman-native operations like hears(), etc.) // Return other events