add trimming to uid and gids

This commit is contained in:
Stanley Dimant
2022-10-04 19:26:42 +02:00
parent 20ade6e127
commit 7535f04082
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ public partial class ApiController
public async Task SendPairedClientAddition(string uid)
{
if (!IsConnected || string.Equals(SecretKey, "-", System.StringComparison.Ordinal)) return;
await _mareHub!.SendAsync(Api.SendUserPairedClientAddition, uid).ConfigureAwait(false);
await _mareHub!.SendAsync(Api.SendUserPairedClientAddition, uid.Trim()).ConfigureAwait(false);
}
public async Task SendPairedClientPauseChange(string uid, bool paused)

View File

@@ -34,7 +34,7 @@ public partial class ApiController
public async Task<bool> SendGroupJoin(string gid, string password)
{
if (!IsConnected || string.Equals(SecretKey, "-", System.StringComparison.Ordinal)) return false;
return await _mareHub!.InvokeAsync<bool>(Api.InvokeGroupJoin, gid, password).ConfigureAwait(false);
return await _mareHub!.InvokeAsync<bool>(Api.InvokeGroupJoin, gid.Trim(), password).ConfigureAwait(false);
}
public async Task SendGroupChangeInviteState(string gid, bool opened)