@interopio/browser 3.5.1 → 3.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4971,6 +4971,7 @@
4971
4971
  registry = CallbackRegistryFactory$1();
4972
4972
  logger;
4973
4973
  contexts;
4974
+ interop;
4974
4975
  bridge;
4975
4976
  windowsController;
4976
4977
  sessionController;
@@ -4992,6 +4993,7 @@
4992
4993
  this.logger = coreGlue.logger.subLogger("channels.controller.web");
4993
4994
  this.logger.trace("starting the web channels controller");
4994
4995
  this.contexts = coreGlue.contexts;
4996
+ this.interop = coreGlue.interop;
4995
4997
  this.addOperationsExecutors();
4996
4998
  this.bridge = ioc.bridge;
4997
4999
  this.windowsController = ioc.windowsController;
@@ -5037,7 +5039,7 @@
5037
5039
  const channelNames = this.getAllChannelNames();
5038
5040
  runDecoderWithIOError(channelNameDecoder(channelNames), name);
5039
5041
  runDecoderWithIOError(optionalNonEmptyStringDecoder, windowId);
5040
- const forAnotherClient = windowId && windowId !== this.windowsController.my().id;
5042
+ const forAnotherClient = windowId && windowId !== this.interop.instance.instance;
5041
5043
  if (forAnotherClient) {
5042
5044
  return await this.bridge.send("channels", operations$5.joinChannel, { channel: name, windowId }, undefined, { includeOperationCheck: true });
5043
5045
  }
@@ -5058,7 +5060,8 @@
5058
5060
  const channelNames = this.getAllChannelNames();
5059
5061
  runDecoderWithIOError(channelNameDecoder(channelNames), config.channel);
5060
5062
  }
5061
- if (config.windowId && config.windowId !== this.windowsController.my().id) {
5063
+ const forAnotherClient = config.windowId && config.windowId !== this.interop.instance.instance;
5064
+ if (config.windowId && forAnotherClient) {
5062
5065
  const leaveData = { windowId: config.windowId, channelName: config.channel };
5063
5066
  await this.bridge.send("channels", operations$5.leaveChannel, leaveData, undefined, { includeOperationCheck: true });
5064
5067
  return;
@@ -5398,7 +5401,7 @@
5398
5401
  runDecoderWithIOError(channelRestrictionsDecoder, config);
5399
5402
  const channelNames = this.getAllChannelNames();
5400
5403
  runDecoderWithIOError(channelNameDecoder(channelNames), config.name);
5401
- const forAnotherClient = config.windowId && config.windowId !== this.windowsController.my().id;
5404
+ const forAnotherClient = config.windowId && config.windowId !== this.interop.instance.instance;
5402
5405
  if (forAnotherClient) {
5403
5406
  return this.bridge.send("channels", operations$5.restrict, { config }, undefined, { includeOperationCheck: true });
5404
5407
  }
@@ -5414,15 +5417,16 @@
5414
5417
  }
5415
5418
  async getRestrictions(windowId) {
5416
5419
  runDecoderWithIOError(optionalNonEmptyStringDecoder, windowId);
5417
- if (!windowId || windowId === this.windowsController.my().id) {
5418
- return this.getMyRestrictions();
5420
+ const forAnotherClient = windowId && windowId !== this.interop.instance.instance;
5421
+ if (windowId && forAnotherClient) {
5422
+ return this.bridge.send("channels", operations$5.getRestrictions, { windowId }, undefined, { includeOperationCheck: true });
5419
5423
  }
5420
- return this.bridge.send("channels", operations$5.getRestrictions, { windowId }, undefined, { includeOperationCheck: true });
5424
+ return this.getMyRestrictions();
5421
5425
  }
5422
5426
  async restrictAll(restrictions) {
5423
5427
  runDecoderWithIOError(restrictionsConfigDecoder, restrictions);
5424
5428
  const allChannelNames = this.getAllChannelNames();
5425
- const forAnotherClient = restrictions.windowId && restrictions.windowId !== this.windowsController.my().id;
5429
+ const forAnotherClient = restrictions.windowId && restrictions.windowId !== this.interop.instance.instance;
5426
5430
  if (forAnotherClient) {
5427
5431
  return this.bridge.send("channels", operations$5.restrictAll, { restrictions }, undefined, { includeOperationCheck: true });
5428
5432
  }
@@ -7018,7 +7022,7 @@
7018
7022
  }
7019
7023
  }
7020
7024
 
7021
- var version$1 = "3.5.1";
7025
+ var version$1 = "3.5.2";
7022
7026
 
7023
7027
  const createFactoryFunction = (coreFactoryFunction) => {
7024
7028
  let cachedApiPromise;