From c4b9fc41839f731626a65c6a5b7d07af7aa9e16f Mon Sep 17 00:00:00 2001 From: "P. Douglas Reeder" Date: Mon, 7 Oct 2024 14:22:32 -0400 Subject: [PATCH] HUD Invite button: fixes bug re: invite-only rooms --- src/components/in-world-hud.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/in-world-hud.js b/src/components/in-world-hud.js index af9bec374a..fd14ee01f1 100644 --- a/src/components/in-world-hud.js +++ b/src/components/in-world-hud.js @@ -60,7 +60,9 @@ AFRAME.registerComponent("in-world-hud", { this.onInviteClick = async (event) => { try { - const extraParams = APP.hub.entry_mode === "invite" ? {hub_invite_id: APP.hubChannel.fetchInvite()} : {}; + const extraParams = APP.hub.entry_mode === "invite" ? + {hub_invite_id: (await APP.hubChannel.fetchInvite()).hub_invite_id} : + {}; const url = hubUrl(APP.hub.hub_id, extraParams).href; await shareInviteUrl(null, url, { roomName: APP.hub.name, appName: configs.translation("app-name") }, true, event); await handleExitTo2DInterstitial(true, () => {});