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:
Neil Dorin
2025-07-24 16:39:28 -06:00
parent 4048efb07e
commit 86e4d2f7fb

View File

@@ -51,7 +51,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
AddAction("/fullStatus", (id, context) =>
{
SendFullStatus();
SendFullStatus(id);
});
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
{
@@ -77,7 +77,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
SelectedCamera = CameraController.SelectedCamera
};
PostStatusMessage(state);
PostStatusMessage(state, clientId);
}