mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:27:21 +01:00
fix not being able to pause players, some other bullshit, update to api4
This commit is contained in:
parent
1577ec93fd
commit
1eccd791d1
6 changed files with 7 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue