Change wording of warning, and remove choice

This commit is contained in:
pizzaboxer 2023-11-03 08:46:29 +00:00
parent fc0d5b14fc
commit 456c3e48ad
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -231,29 +231,27 @@ namespace Bloxstrap
{ {
// If channel does not exist // If channel does not exist
if (ex.ResponseMessage.StatusCode == HttpStatusCode.NotFound) if (ex.ResponseMessage.StatusCode == HttpStatusCode.NotFound)
{
App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because a WindowsPlayer build does not exist for {App.Settings.Prop.Channel}"); App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because a WindowsPlayer build does not exist for {App.Settings.Prop.Channel}");
}
// If channel is not available to the user (private/internal release channel) // If channel is not available to the user (private/internal release channel)
else if (ex.ResponseMessage.StatusCode == HttpStatusCode.Unauthorized) else if (ex.ResponseMessage.StatusCode == HttpStatusCode.Unauthorized)
{ {
App.Logger.WriteLine(LOG_IDENT, $"Channel {App.Settings.Prop.Channel} is unavailable to the user."); App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because {App.Settings.Prop.Channel} is restricted for public use.");
// Only prompt if user has channel switching mode set to something other than Automatic. // Only prompt if user has channel switching mode set to something other than Automatic.
if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic) if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic)
{ {
MessageBoxResult channelChangeResult = Controls.ShowMessageBox( Controls.ShowMessageBox(
$"Release channel {App.Settings.Prop.Channel} is not available to you. Would you like to reset to {RobloxDeployment.DefaultChannel}?", $"The channel you're currently on ({App.Settings.Prop.Channel}) has now been restricted from public use. You will now be on the default channel ({RobloxDeployment.DefaultChannel}).",
MessageBoxImage.Warning, MessageBoxImage.Information
MessageBoxButton.YesNo); );
}
if (channelChangeResult != MessageBoxResult.Yes) }
else
{ {
Controls.ShowMessageBox($"Client cannot be launched as you are enrolled into an unavailable release channel and refused to reset.", MessageBoxImage.Error); throw;
App.Logger.WriteLine(LOG_IDENT, $"User refused to reset channel. Aborting.");
App.Terminate(ErrorCode.ERROR_CANCELLED);
} }
}
App.Logger.WriteLine(LOG_IDENT, $"Resetting release channel to {RobloxDeployment.DefaultChannel} as {App.Settings.Prop.Channel} is unavailable to the user.");
}
else throw;
App.Settings.Prop.Channel = RobloxDeployment.DefaultChannel; App.Settings.Prop.Channel = RobloxDeployment.DefaultChannel;
clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel); clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel);