@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.
package/package.json
CHANGED
package/src/modules/wt-iot.js
CHANGED
|
@@ -280,7 +280,11 @@ class Iot {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// Find a suitable topic for the connection check
|
|
283
|
-
|
|
283
|
+
let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
|
|
284
|
+
|
|
285
|
+
if(!suitableTopic) {
|
|
286
|
+
suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
|
|
287
|
+
}
|
|
284
288
|
|
|
285
289
|
if (!suitableTopic) {
|
|
286
290
|
reject(new Error('No suitable topic found for connection check'));
|
|
@@ -323,7 +327,12 @@ class Iot {
|
|
|
323
327
|
return;
|
|
324
328
|
}
|
|
325
329
|
// Find a suitable topic for the connection check
|
|
326
|
-
|
|
330
|
+
let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
|
|
331
|
+
|
|
332
|
+
if(!suitableTopic) {
|
|
333
|
+
suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
|
|
334
|
+
}
|
|
335
|
+
|
|
327
336
|
if (!suitableTopic) {
|
|
328
337
|
this.log('No suitable topic found for keep alive message');
|
|
329
338
|
return;
|
package/src/modules/wt-room.js
CHANGED