🐛 Fix bot not proceeding when embedded
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/js",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"description": "Javascript library to display typebots on your website",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { guessApiHost } from '@/utils/guessApiHost'
|
||||
import type { ChatReply, SendMessageInput } from 'models'
|
||||
import { getViewerUrl, isEmpty, sendRequest } from 'utils'
|
||||
import { isNotEmpty, sendRequest } from 'utils'
|
||||
|
||||
export async function sendMessageQuery({
|
||||
apiHost,
|
||||
@@ -7,7 +8,7 @@ export async function sendMessageQuery({
|
||||
}: SendMessageInput & { apiHost?: string }) {
|
||||
const response = await sendRequest<ChatReply>({
|
||||
method: 'POST',
|
||||
url: `${isEmpty(apiHost) ? getViewerUrl() : apiHost}/api/v1/sendMessage`,
|
||||
url: `${isNotEmpty(apiHost) ? apiHost : guessApiHost()}/api/v1/sendMessage`,
|
||||
body,
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/react",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"description": "React library to display typebots on your website",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typebot-js",
|
||||
"version": "2.2.16",
|
||||
"version": "2.2.17",
|
||||
"main": "dist/index.js",
|
||||
"unpkg": "dist/index.global.js",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"deploy": "pnpm copy && pnpm commit",
|
||||
"copy": "svn copy ./trunk ./tags/3.0.0",
|
||||
"commit": "svn ci -m 'Introduce new bot engine'"
|
||||
"copy": "svn copy ./trunk ./tags/3.0.1",
|
||||
"commit": "svn ci -m 'Fix standard flow not proceeding'"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Requires at least: 5.0
|
||||
Tested up to: 6.0
|
||||
License: GPL 2.0
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
Stable Tag: 3.0.0
|
||||
Stable Tag: 3.0.1
|
||||
|
||||
Build beautiful conversational forms
|
||||
|
||||
@@ -26,6 +26,9 @@ This plugin relies on Typebot which is a tool that allows you to create conversa
|
||||
3. Activate your Typebot with the "Typebot" admin button located in the sidebar
|
||||
|
||||
== Changelog ==
|
||||
= 3.0.1 =
|
||||
* Fix flow not proceeding on unknown domains
|
||||
|
||||
= 3.0.0 =
|
||||
* Complete rework of the plugin. You are now required to generate a code snippet on https://app.typebot.io
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class Typebot_Public
|
||||
|
||||
public function add_typebot_container($attributes = [])
|
||||
{
|
||||
$lib_url = "https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.9/dist/web.js";
|
||||
$lib_url = "https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.14/dist/web.js";
|
||||
$width = '100%';
|
||||
$height = '500px';
|
||||
if (array_key_exists('width', $attributes)) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Plugin Name: Typebot
|
||||
* Description: Convert more with conversational forms
|
||||
* Version: 3.0.0
|
||||
* Version: 3.0.1
|
||||
* Author: Typebot
|
||||
* Author URI: http://typebot.io/
|
||||
* License: GPL-2.0+
|
||||
@@ -16,7 +16,7 @@ if (!defined('WPINC')) {
|
||||
die();
|
||||
}
|
||||
|
||||
define('TYPEBOT_VERSION', '3.0.0');
|
||||
define('TYPEBOT_VERSION', '3.0.1');
|
||||
|
||||
function activate_typebot()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user