BroadcastChannelResponsePayload,
MessageEvent,
} from '../types/WorkerBroadcastChannel';
BroadcastChannelResponsePayload,
MessageEvent,
} from '../types/WorkerBroadcastChannel';
import logger from '../utils/Logger';
import type ChargingStation from './ChargingStation';
import WorkerBroadcastChannel from './WorkerBroadcastChannel';
import logger from '../utils/Logger';
import type ChargingStation from './ChargingStation';
import WorkerBroadcastChannel from './WorkerBroadcastChannel';
- if (requestPayload?.hashId !== this.chargingStation.hashId) {
+ if (
+ requestPayload?.hashId === undefined &&
+ (requestPayload?.hashIds as string[])?.includes(this.chargingStation.hashId) === false
+ ) {
+ return;
+ }
+ if (
+ requestPayload?.hashIds === undefined &&
+ requestPayload?.hashId !== this.chargingStation.hashId
+ ) {
let responsePayload: BroadcastChannelResponsePayload;
let commandResponse: CommandResponse;
try {
commandResponse = await this.commandHandler(command, requestPayload);
if (commandResponse === undefined) {
let responsePayload: BroadcastChannelResponsePayload;
let commandResponse: CommandResponse;
try {
commandResponse = await this.commandHandler(command, requestPayload);
if (commandResponse === undefined) {