@reactoo/watchtogether-sdk-js 2.7.39 → 2.7.40

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @reactoo/watchtogether-sdk-js
3
- * @version 2.7.38
3
+ * @version 2.7.39
4
4
  */
5
5
  (function webpackUniversalModuleDefinition(root, factory) {
6
6
  if(typeof exports === 'object' && typeof module === 'object')
@@ -25494,7 +25494,10 @@ class Iot {
25494
25494
  }
25495
25495
 
25496
25496
  // Find a suitable topic for the connection check
25497
- const suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
25497
+ let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
25498
+ if (!suitableTopic) {
25499
+ suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
25500
+ }
25498
25501
  if (!suitableTopic) {
25499
25502
  reject(new Error('No suitable topic found for connection check'));
25500
25503
  return;
@@ -25531,7 +25534,10 @@ class Iot {
25531
25534
  return;
25532
25535
  }
25533
25536
  // Find a suitable topic for the connection check
25534
- const suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
25537
+ let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
25538
+ if (!suitableTopic) {
25539
+ suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
25540
+ }
25535
25541
  if (!suitableTopic) {
25536
25542
  this.log('No suitable topic found for keep alive message');
25537
25543
  return;