From 8c1a680f8420bd4e003b9419af29054b2e73efeb Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Sat, 3 Jun 2023 11:14:39 +0300 Subject: [PATCH] Revert "[WIP] Add Utils.resolveScreenName (#884)" (#885) This reverts commit 051fb316a4566d47dc6c883a675ac70b00c204d2. --- VKAPI/Handlers/Utils.php | 29 ----------------------------- 1 file changed, 29 deletions(-) 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() - ]; - } - } }