mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
feat: Update SendFullStatus to target specific clients
Modified the `SendFullStatus` method to accept a `string clientId` parameter, allowing it to send status messages to specific clients. Updated the action for `"/fullStatus"` to pass the client ID and adjusted the `PostStatusMessage` call accordingly.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
|
|
||||||
AddAction("/fullStatus", (id, context) =>
|
AddAction("/fullStatus", (id, context) =>
|
||||||
{
|
{
|
||||||
SendFullStatus();
|
SendFullStatus(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAction("/selectCamera", (id, content) =>
|
AddAction("/selectCamera", (id, content) =>
|
||||||
@@ -69,7 +69,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendFullStatus()
|
private void SendFullStatus(string clientId)
|
||||||
{
|
{
|
||||||
var state = new IHasCamerasStateMessage
|
var state = new IHasCamerasStateMessage
|
||||||
{
|
{
|
||||||
@@ -77,7 +77,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
SelectedCamera = CameraController.SelectedCamera
|
SelectedCamera = CameraController.SelectedCamera
|
||||||
};
|
};
|
||||||
|
|
||||||
PostStatusMessage(state);
|
PostStatusMessage(state, clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user