From 2448f0b16a897554353bd9ada721c3dc402ff1d8 Mon Sep 17 00:00:00 2001
From: Greg Fodor <gfodor@gmail.com>
Date: Tue, 2 Oct 2018 00:54:55 +0000
Subject: [PATCH] Fix bot

---
 src/hub.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/hub.js b/src/hub.js
index 4db71a661..f7b271774 100644
--- a/src/hub.js
+++ b/src/hub.js
@@ -260,10 +260,6 @@ async function handleHubChannelJoined(entryManager, hubChannel, data) {
     debug: !!isDebug
   });
 
-  if (isBotMode) {
-    entryManager.enterSceneWhenLoaded(new MediaStream(), false);
-  }
-
   while (!scene.components["networked-scene"] || !scene.components["networked-scene"].data) await nextTick();
 
   scene.components["networked-scene"]
@@ -278,6 +274,10 @@ async function handleHubChannelJoined(entryManager, hubChannel, data) {
 
         hubChannel.channel.push("naf", payload);
       };
+
+      if (isBotMode) {
+        entryManager.enterSceneWhenLoaded(new MediaStream(), false);
+      }
     })
     .catch(connectError => {
       // hacky until we get return codes
-- 
GitLab