🐛 (share) Enable back empty public ID for self-hosted version

Closes #576
This commit is contained in:
Baptiste Arnaud
2023-07-07 14:35:17 +02:00
parent 5ae6c64d06
commit 56078b4e02
8 changed files with 32 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
import { InitialChatReply } from '@/types'
import { guessApiHost } from '@/utils/guessApiHost'
import type { SendMessageInput, StartParams } from '@typebot.io/schemas'
import { isNotEmpty, sendRequest } from '@typebot.io/lib'
import { isNotDefined, isNotEmpty, sendRequest } from '@typebot.io/lib'
export async function getInitialChatReplyQuery({
typebot,
@@ -13,7 +13,7 @@ export async function getInitialChatReplyQuery({
}: StartParams & {
apiHost?: string
}) {
if (!typebot)
if (isNotDefined(typebot))
throw new Error('Typebot ID is required to get initial messages')
return sendRequest<InitialChatReply>({