Skip to content

Commit

Permalink
feat: use sendCommand for better checks
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Feb 25, 2025
1 parent 75c6903 commit e51695c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export type WebSocketTcpClientDeviceState = Timeline.TimelineState<TSRTimelineCo
if (!payload?.message) {
return { result: ActionExecutionResultCode.Error, response: { key: 'Missing message in payload' } }
}
await this.connection.sendWebSocketMessage(payload.message)
await this.sendCommand(payload.message)
return { result: ActionExecutionResultCode.Ok }
},
[WebsocketTcpClientActions.SendTcpMessage]: async (_id: string, payload?: Record<string, any>) => {
if (!payload?.command) {
return { result: ActionExecutionResultCode.Error, response: { key: 'Missing command in payload' } }
}
await this.connection.sendTcpMessage(payload.command)
await this.sendCommand(payload.command)
return { result: ActionExecutionResultCode.Ok }
},
}
Expand Down

0 comments on commit e51695c

Please sign in to comment.