fix not being able to pause players, some other bullshit, update to api4

This commit is contained in:
Stanley Dimant
2022-07-10 14:20:43 +02:00
parent 1577ec93fd
commit 1eccd791d1
6 changed files with 7 additions and 7 deletions

View File

@@ -162,7 +162,7 @@ namespace MareSynchronos.WebAPI
var token = _connectionCancellationTokenSource.Token;
while (ServerState is not ServerState.Connected && !token.IsCancellationRequested)
{
await StopAllConnections(_connectionCancellationTokenSource.Token);
await StopAllConnections(token);
try
{
@@ -195,7 +195,7 @@ namespace MareSynchronos.WebAPI
}
_connectionDto =
await _connectionHub.InvokeAsync<ConnectionDto>(ConnectionHubAPI.InvokeHeartbeat, token);
await _connectionHub.InvokeAsync<ConnectionDto>(ConnectionHubAPI.InvokeHeartbeat, _dalamudUtil.PlayerNameHashed, token);
if (ServerState is ServerState.Connected) // user is authorized && server is legit
{
Logger.Debug("Initializing data");
@@ -269,7 +269,6 @@ namespace MareSynchronos.WebAPI
if (!string.IsNullOrEmpty(SecretKey) && !_pluginConfiguration.FullPause)
{
options.Headers.Add("Authorization", SecretKey);
options.Headers.Add("CharacterNameHash", _dalamudUtil.PlayerNameHashed);
}
options.Transports = HttpTransportType.WebSockets;