diff --git a/VKAPI/Handlers/Utils.php b/VKAPI/Handlers/Utils.php index c4e19d6a..7144a39a 100644 --- a/VKAPI/Handlers/Utils.php +++ b/VKAPI/Handlers/Utils.php @@ -1,39 +1,10 @@ getMatchingRoute("/$screen_name")[0]->presenter !== "UnknownTextRouteStrategy") { - if(substr($screen_name, 0, strlen("id")) === "id") { - return (object) [ - "object_id" => (int) substr($screen_name, strlen("id")), - "type" => "user" - ]; - } else if(substr($screen_name, 0, strlen("club")) === "club") { - return (object) [ - "object_id" => (int) substr($screen_name, strlen("club")), - "type" => "group" - ]; - } - } else { - $alias = (new Aliases)->getByShortCode($screen_name); - - if(!$alias) return (object)[]; - - return (object) [ - "object_id" => $alias->getOwnerId(), - "type" => $alias->getType() - ]; - } - } }