feat(wip) room properties

This commit is contained in:
2024-04-14 19:07:48 +03:00
parent d115c98b79
commit accd442388
7 changed files with 55 additions and 8 deletions
@@ -16,6 +16,7 @@
using System.Net;
using System.Net.Http.Json;
using System.Text;
using Newtonsoft.Json;
using Ragon.Protocol;
using Ragon.Server.Handler;
@@ -58,7 +59,8 @@ public class RagonWebHookPlugin
var authorizationResponse = JsonConvert.DeserializeObject<AuthorizationResponse>(content);
if (authorizationResponse != null)
{
var lobbyPlayer = new RagonLobbyPlayer(context.Connection, authorizationResponse.Id, authorizationResponse.Name, authorizationResponse.Payload);
var bytes = Encoding.UTF8.GetBytes(authorizationResponse.Payload);
var lobbyPlayer = new RagonLobbyPlayer(context.Connection, authorizationResponse.Id, authorizationResponse.Name, bytes);
context.SetPlayer(lobbyPlayer);
authorizationOperation.Approve(context);