fix not being able to pause players, some other bullshit, update to api4
This commit is contained in:
@@ -32,7 +32,7 @@ namespace MareSynchronos.WebAPI
|
||||
await _fileHub!.SendAsync(FilesHubAPI.SendDeleteAllFiles);
|
||||
}
|
||||
|
||||
public async Task<string> DownloadFile(string hash, CancellationToken ct)
|
||||
private async Task<string> DownloadFile(string hash, CancellationToken ct)
|
||||
{
|
||||
var reader = _fileHub!.StreamAsync<byte[]>(FilesHubAPI.StreamDownloadFileAsync, hash, ct);
|
||||
string fileName = Path.GetTempFileName();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user