From 5dea2468f821cb2e29a0d31c926f314cbcc06055 Mon Sep 17 00:00:00 2001 From: Pablo Ferreiro Date: Wed, 1 Feb 2023 15:22:53 +0100 Subject: [PATCH] Better handling of private accounts --- app/Controllers/UserController.php | 4 ---- composer.json | 2 +- composer.lock | 2 +- templates/views/user.latte | 4 ++++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index 0d73d07..4b74dec 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -18,10 +18,6 @@ class UserController { if ($user->ok()) { $info = $user->getInfo(); $feed = $user->getFeed(); - if ($info->detail->privateAccount) { - ErrorHandler::showText(401, "Private account detected! Not supported"); - return; - } Wrappers::latte('user', new FullTemplate($info->detail->nickname, $info, $feed)); } else { ErrorHandler::showMeta($user->error()); diff --git a/composer.json b/composer.json index 50cb54b..56c29d4 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "pablouser1/proxitok", "description": "An alternative frontend for TikTok", - "version": "2.4.5.0", + "version": "2.4.6.0", "license": "AGPL-3.0-or-later", "type": "project", "authors": [ diff --git a/composer.lock b/composer.lock index f996315..60d2536 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "818a3e623705c076822f3d895a0d99ca", + "content-hash": "8536364f5905bc49a9a88d4fa3daa3be", "packages": [ { "name": "bramus/router", diff --git a/templates/views/user.latte b/templates/views/user.latte index 8a950a6..2e07961 100644 --- a/templates/views/user.latte +++ b/templates/views/user.latte @@ -12,6 +12,10 @@

{$info->detail->uniqueId}

{include '../components/rss.latte'}

+ {if $info->detail->privateAccount} +

Private account

+ {/if} +

{$info->detail->signature}

Following: {number($info->stats->followingCount)} / Followers: {number($info->stats->followerCount)}

Hearts: {number($info->stats->heartCount)} / Videos: {$info->stats->videoCount}