Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hero-persson committed Jan 14, 2025
2 parents ecf0bce + bf48b45 commit c6103f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ set(Launcher_FMLLIBS_BASE_URL "https://files.prismlauncher.org/fmllibs/" CACHE S
######## Set version numbers ########
set(Launcher_VERSION_MAJOR 9)
set(Launcher_VERSION_MINOR 2)
set(Launcher_VERSION_PATCH 0)
set(Launcher_VERSION_PATCH 1)

set(Launcher_VERSION_NAME "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.${Launcher_VERSION_PATCH}")
set(Launcher_VERSION_NAME4 "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.${Launcher_VERSION_PATCH}.0")
Expand Down
14 changes: 8 additions & 6 deletions launcher/minecraft/auth/steps/YggdrasilStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@ void YggdrasilStep::refresh()
* "requestUser": true/false // request the user structure
* }
*/
QJsonObject selectedProfile;
selectedProfile.insert("id", m_data->profileId());
selectedProfile.insert("name", m_data->profileName());

QJsonObject req;
req.insert("clientToken", m_data->clientToken());
req.insert("accessToken", m_data->accessToken());
req.insert("selectedProfile", selectedProfile);

if (m_didSelectProfile) {
QJsonObject selectedProfile;
selectedProfile.insert("id", m_data->profileId());
selectedProfile.insert("name", m_data->profileName());
req.insert("selectedProfile", selectedProfile);
}
req.insert("requestUser", false);

QJsonDocument doc(req);
Expand Down Expand Up @@ -239,8 +242,7 @@ void YggdrasilStep::processResponse(QJsonObject responseData)
m_data->yggdrasilToken.validity = Validity::Certain;
m_data->yggdrasilToken.issueInstant = QDateTime::currentDateTimeUtc();

// Get UUID here since we need it for later
// FIXME: Here is a simple workaround for now,, which uses the first available profile when selectedProfile is not provided
// Select a profile
auto profile = responseData.value("selectedProfile");
if (profile.isObject()) {
m_didSelectProfile = false;
Expand Down

0 comments on commit c6103f0

Please sign in to comment.