diff --git a/src/hub.js b/src/hub.js index 80741c2e11939461503bb57cd99a1cee97a0ee75..299845ca452a34eb58d0c2542ab26541bec260d6 100644 --- a/src/hub.js +++ b/src/hub.js @@ -122,7 +122,11 @@ function qsTruthy(param) { return val === null || /1|on|true/i.test(val); } -registerTelemetry(); +const isBotMode = qsTruthy("bot"); + +if (!isBotMode) { + registerTelemetry(); +} AFRAME.registerInputBehaviour("trackpad_dpad4", trackpad_dpad4); AFRAME.registerInputBehaviour("joystick_dpad4", joystick_dpad4); @@ -130,7 +134,6 @@ AFRAME.registerInputActivator("pressedmove", PressedMove); AFRAME.registerInputActivator("reverseY", ReverseY); AFRAME.registerInputMappings(inputConfig, true); -const isBotMode = qsTruthy("bot"); const concurrentLoadDetector = new ConcurrentLoadDetector(); concurrentLoadDetector.start(); @@ -279,9 +282,11 @@ const onReady = async () => { if (!qsTruthy("offline")) { document.body.addEventListener("connected", () => { - hubChannel.sendEntryEvent().then(() => { - store.update({ activity: { lastEnteredAt: moment().toJSON() } }); - }); + if (!isBotMode) { + hubChannel.sendEntryEvent().then(() => { + store.update({ activity: { lastEnteredAt: moment().toJSON() } }); + }); + } remountUI({ occupantCount: NAF.connection.adapter.publisher.initialOccupants.length + 1 }); });