Name fixes.

This commit is contained in:
2025-08-22 21:26:51 +01:00
parent d749ab343b
commit 1e7e6d1858
24 changed files with 70 additions and 70 deletions

View File

@@ -21,10 +21,10 @@ namespace MareSynchronos.WebAPI;
#pragma warning disable MA0040
public sealed partial class ApiController : DisposableMediatorSubscriberBase, IMareHubClient
{
public const string ElezenServer = "Snowcloak Main Server";
public const string ElezenServiceUri = "wss://hub.snowcloak-sync.com";
public const string ElezenServiceApiUri = "wss://hub.snowcloak-sync.com/";
public const string ElezenServiceHubUri = "wss://hub.snowcloak-sync.com/mare";
public const string SnowcloakServer = "Snowcloak Main Server";
public const string SnowcloakServiceUri = "wss://hub.snowcloak-sync.com";
public const string SnowcloakServiceApiUri = "wss://hub.snowcloak-sync.com/";
public const string SnowcloakServiceHubUri = "wss://hub.snowcloak-sync.com/mare";
private readonly DalamudUtilService _dalamudUtil;
private readonly HubFactory _hubFactory;
@@ -194,7 +194,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client incompatible",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"This client version is incompatible and will not be able to connect. Please update your Elezen client.",
$"This client version is incompatible and will not be able to connect. Please update your Snowcloak client.",
NotificationType.Error));
}
await StopConnection(ServerState.VersionMisMatch).ConfigureAwait(false);
@@ -206,7 +206,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client outdated",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"Please keep your Elezen client up-to-date.",
$"Please keep your Snowcloak client up-to-date.",
NotificationType.Warning, TimeSpan.FromSeconds(15)));
}

View File

@@ -87,14 +87,14 @@ public class HubFactory : MediatorSubscriberBase
};
}
if (_serverConfigurationManager.CurrentApiUrl.Equals(ApiController.ElezenServiceUri, StringComparison.Ordinal))
if (_serverConfigurationManager.CurrentApiUrl.Equals(ApiController.SnowcloakServiceUri, StringComparison.Ordinal))
{
var mainServerConfig = await _remoteConfig.GetConfigAsync<HubConnectionConfig>("mainServer").ConfigureAwait(false) ?? new();
defaultConfig = mainServerConfig;
if (string.IsNullOrEmpty(mainServerConfig.ApiUrl))
defaultConfig.ApiUrl = ApiController.ElezenServiceApiUri;
defaultConfig.ApiUrl = ApiController.SnowcloakServiceApiUri;
if (string.IsNullOrEmpty(mainServerConfig.HubUrl))
defaultConfig.HubUrl = ApiController.ElezenServiceHubUri;
defaultConfig.HubUrl = ApiController.SnowcloakServiceHubUri;
}
string jsonResponse;

View File

@@ -73,13 +73,13 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
var authApiUrl = _serverManager.CurrentApiUrl;
// Override the API URL used for auth from remote config, if one is available
if (authApiUrl.Equals(ApiController.ElezenServiceUri, StringComparison.Ordinal))
if (authApiUrl.Equals(ApiController.SnowcloakServiceUri, StringComparison.Ordinal))
{
var config = await _remoteConfig.GetConfigAsync<HubConnectionConfig>("mainServer").ConfigureAwait(false) ?? new();
if (!string.IsNullOrEmpty(config.ApiUrl))
authApiUrl = config.ApiUrl;
else
authApiUrl = ApiController.ElezenServiceApiUri;
authApiUrl = ApiController.SnowcloakServiceApiUri;
}
try