Skip to content

Commit

Permalink
Merge pull request #6176 from mozilla/remove_entity_state_api_flag
Browse files Browse the repository at this point in the history
Remove entity_state_api feature flag
  • Loading branch information
takahirox authored Jul 28, 2023
2 parents 2a325e3 + fddd1ab commit a246c7c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/utils/entity-state-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,9 @@ function push(hubChannel: HubChannel, command: HubChannelCommand, payload?: HubC
if (!localClientID) {
throw new Error("Cannot get/set entity states without a local client ID.");
}
if (qsTruthy("entity_state_api")) {
return new Promise((resolve, reject) => {
hubChannel.channel.push(command, payload).receive("ok", resolve).receive("error", reject);
});
} else {
console.warn("Entity state API is inactive. Would have sent:", { command, payload });
return Promise.reject();
}
return new Promise((resolve, reject) => {
hubChannel.channel.push(command, payload).receive("ok", resolve).receive("error", reject);
});
}

function listEntityStates(hubChannel: HubChannel) {
Expand Down

0 comments on commit a246c7c

Please sign in to comment.