mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
fix: send touchpanel key to client when client joins direct server
This commit is contained in:
@@ -723,7 +723,7 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||||||
|
|
||||||
private UiClient BuildUiClient(string roomKey, JoinToken token, string key)
|
private UiClient BuildUiClient(string roomKey, JoinToken token, string key)
|
||||||
{
|
{
|
||||||
var c = new UiClient($"uiclient-{key}-{roomKey}-{token.Id}", token.Id, token.Token);
|
var c = new UiClient($"uiclient-{key}-{roomKey}-{token.Id}", token.Id, token.Token, token.TouchpanelKey);
|
||||||
this.LogInformation("Constructing UiClient with key {key} and ID {id}", key, token.Id);
|
this.LogInformation("Constructing UiClient with key {key} and ID {id}", key, token.Id);
|
||||||
c.Controller = _parent;
|
c.Controller = _parent;
|
||||||
c.RoomKey = roomKey;
|
c.RoomKey = roomKey;
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Token { get; private set; }
|
public string Token { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Touchpanel Key associated with this client
|
||||||
|
/// </summary>
|
||||||
|
public string TouchpanelKey { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the mobile control system controller that handles this client's messages
|
/// Gets or sets the mobile control system controller that handles this client's messages
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -75,11 +80,13 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||||||
/// <param name="key">The unique key to identify this client</param>
|
/// <param name="key">The unique key to identify this client</param>
|
||||||
/// <param name="id">The client ID used by the client for this connection</param>
|
/// <param name="id">The client ID used by the client for this connection</param>
|
||||||
/// <param name="token">The token associated with this client</param>
|
/// <param name="token">The token associated with this client</param>
|
||||||
public UiClient(string key, string id, string token)
|
/// <param name="touchpanelKey">The touchpanel key associated with this client</param>
|
||||||
|
public UiClient(string key, string id, string token, string touchpanelKey = "")
|
||||||
{
|
{
|
||||||
Key = key;
|
Key = key;
|
||||||
Id = id;
|
Id = id;
|
||||||
Token = token;
|
Token = token;
|
||||||
|
TouchpanelKey = touchpanelKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -105,6 +112,7 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||||||
{
|
{
|
||||||
clientId = Id,
|
clientId = Id,
|
||||||
roomKey = RoomKey,
|
roomKey = RoomKey,
|
||||||
|
touchpanelKey = string.IsNullOrEmpty(TouchpanelKey) ? TouchpanelKey : string.Empty,
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user