Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Fix broken invite link

Luke Vella8e7b5a3d93d9
diff --git a/apps/web/src/components/invite-dialog.tsx b/apps/web/src/components/invite-dialog.tsx
index 789d34446..e3eb9d3ed 100644
--- a/apps/web/src/components/invite-dialog.tsx
+++ b/apps/web/src/components/invite-dialog.tsx
@@ -16,6 +16,7 @@ import { useCopyToClipboard } from "react-use";
import { useParticipants } from "@/components/participants-provider";
import { Trans } from "@/components/trans";
import { usePoll } from "@/contexts/poll";
+import { isSelfHosted } from "@/utils/constants";
export const InviteDialog = () => {
const { participants } = useParticipants();
@@ -30,7 +31,10 @@ export const InviteDialog = () => {
}
}, [state]);
- const inviteLink = shortUrl(`/invite/${poll?.id}`);
+ const inviteLink = isSelfHosted
+ ? window.location.origin + `/invite/${poll?.id}`
+ : shortUrl(`/invite/${poll?.id}`);
+
const [didCopy, setDidCopy] = React.useState(false);
return (