From 0f8f65623f10edfe69d79c4097cd0ebc4160e0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Thu, 28 Aug 2025 11:43:27 +0200 Subject: [PATCH] Get banned/elevation properties from View.json --- src/client/SaveInfo.h | 3 +++ src/client/http/GetSaveRequest.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/client/SaveInfo.h b/src/client/SaveInfo.h index 08b59e83f..c5163ba47 100644 --- a/src/client/SaveInfo.h +++ b/src/client/SaveInfo.h @@ -1,5 +1,6 @@ #pragma once #include "common/String.h" +#include "User.h" #include #include #include @@ -19,6 +20,8 @@ public: int Comments; int Views; int Version; + User::Elevation authorElevation; + bool authorIsBanned; ByteString userName; diff --git a/src/client/http/GetSaveRequest.cpp b/src/client/http/GetSaveRequest.cpp index 81decbcd3..c13778eb4 100644 --- a/src/client/http/GetSaveRequest.cpp +++ b/src/client/http/GetSaveRequest.cpp @@ -59,6 +59,8 @@ namespace http saveInfo->Favourite = document["Favourite"].asBool(); saveInfo->Views = document["Views"].asInt(); saveInfo->Version = document["Version"].asInt(); + saveInfo->authorElevation = User::ElevationFromString(document["Elevation"].asString()); + saveInfo->authorIsBanned = document["IsBanned"].asBool(); } catch (const std::exception &ex) {