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
This commit is contained in:
@@ -2174,6 +2174,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
var clientId = content["clientId"].Value<string>();
|
var clientId = content["clientId"].Value<string>();
|
||||||
var roomKey = content["roomKey"].Value<string>();
|
var roomKey = content["roomKey"].Value<string>();
|
||||||
|
var touchpanelKey = content.SelectToken("touchpanelKey");
|
||||||
|
|
||||||
if (_roomCombiner == null)
|
if (_roomCombiner == null)
|
||||||
{
|
{
|
||||||
@@ -2236,6 +2237,20 @@ namespace PepperDash.Essentials
|
|||||||
SendMessageObject(newMessage);
|
SendMessageObject(newMessage);
|
||||||
|
|
||||||
SendDeviceInterfaces(clientId);
|
SendDeviceInterfaces(clientId);
|
||||||
|
|
||||||
|
SendTouchpanelKey(clientId, touchpanelKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SendTouchpanelKey(string clientId, JToken touchpanelKeyToken)
|
||||||
|
{
|
||||||
|
if (touchpanelKeyToken == null) { return; }
|
||||||
|
|
||||||
|
SendMessageObject(new MobileControlMessage
|
||||||
|
{
|
||||||
|
Type = "/system/touchpanelKey",
|
||||||
|
ClientId = clientId,
|
||||||
|
Content = touchpanelKeyToken.Value<string>()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendDeviceInterfaces(string clientId)
|
private void SendDeviceInterfaces(string clientId)
|
||||||
|
|||||||
Reference in New Issue
Block a user