From 7fe118f303ceb6ee12f3183f9f9ce3b756ec7e2e Mon Sep 17 00:00:00 2001 From: blankie Date: Fri, 24 Nov 2023 11:07:35 +1100 Subject: [PATCH] Fix displaying hidden followers count https://chaosfem.tw/@Terra --- models.h | 2 +- routes/user.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models.h b/models.h index cd27c82..54c6623 100644 --- a/models.h +++ b/models.h @@ -34,7 +34,7 @@ struct Account { std::string avatar; std::string avatar_static; std::string header; - uint64_t followers_count; + int64_t followers_count; uint64_t following_count; uint64_t statuses_count; std::vector emojis; diff --git a/routes/user.cpp b/routes/user.cpp index 928f27b..1ebb4a9 100644 --- a/routes/user.cpp +++ b/routes/user.cpp @@ -112,7 +112,8 @@ static inline Element user_header(const httplib::Request& req, const std::string Element("br"), Element("b", {std::to_string(account.statuses_count)}), " Posts", " / ", Element("b", {std::to_string(account.following_count)}), " Following", " / ", - Element("b", {std::to_string(account.followers_count)}), " Followers", + // https://chaosfem.tw/@Terra + Element("b", {account.followers_count >= 0 ? std::to_string(account.followers_count) : "???"}), " Followers", }), }),