prefix https:// with invite code copied

pull/1073/head
Harish Vishwakarma 2024-12-11 20:13:01 +05:30
parent 49f81fdf14
commit e58f2d5351
1 changed files with 4 additions and 2 deletions

View File

@ -7,10 +7,10 @@ import { ModalForm } from "@revoltchat/ui";
import { noopAsync } from "../../../lib/js";
import { IS_REVOLT } from "../../../version";
import { takeError } from "../../client/jsx/error";
import { modalController } from "../ModalController";
import { ModalProps } from "../types";
import { IS_REVOLT } from "../../../version";
/**
* Code block which displays invite
@ -79,7 +79,9 @@ export default function CreateInvite({
children: <Text id="app.context_menu.copy_link" />,
onClick: () =>
modalController.writeText(
IS_REVOLT ? `https://rvlt.gg/${code}` : `${window.location.host}/invite/${code}`
IS_REVOLT
? `https://rvlt.gg/${code}`
: `https://${window.location.host}/invite/${code}`,
),
},
]}