Skip to content

Commit 688c712

Browse files
committed
v10.0.3
1 parent 37cd037 commit 688c712

File tree

7 files changed

+36
-6
lines changed

7 files changed

+36
-6
lines changed

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Gleap = window.Gleap;
22

33
Gleap.setFrameUrl("http://0.0.0.0:3001");
44
Gleap.setApiUrl("http://0.0.0.0:9000");
5-
Gleap.initialize("dEZmeezQWkKq2sgaBxtDj8Gk9FMfQsPq");
5+
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
66
//Gleap.setEnvironment("dev");
77

88
/*Gleap.setUrlHandler((url, newTab) => {

index.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export namespace Gleap {
3030
replays: Boolean;
3131
}
3232
): void;
33+
function startBot(botId: string, showBackButton?: boolean): void;
3334
function attachCustomData(customData: any): void;
3435
function setCustomData(key: string, value: string): void;
3536
function removeCustomData(key: string): void;
@@ -70,7 +71,9 @@ export namespace Gleap {
7071
function attachNetworkLogs(networkLogs: string): void;
7172
function clearIdentity(): void;
7273
function setTags(tags: string[]): void;
73-
function setDisableInAppNotifications(disableInAppNotifications: boolean): void;
74+
function setDisableInAppNotifications(
75+
disableInAppNotifications: boolean
76+
): void;
7477
function identify(
7578
userId: string,
7679
customerData: {
@@ -91,7 +94,9 @@ export namespace Gleap {
9194
shareToken?: string,
9295
showBackButton?: boolean
9396
): void;
94-
function setUrlHandler(urlHandler: (url: string, newTab?: boolean) => void): void;
97+
function setUrlHandler(
98+
urlHandler: (url: string, newTab?: boolean) => void
99+
): void;
95100
function openHelpCenter(showBackButton?: boolean): void;
96101
function openHelpCenterCollection(
97102
collectionId: string,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "10.0.0",
3+
"version": "10.0.3",
44
"main": "build/index.js",
55
"scripts": {
66
"start": "webpack serve",

published/10.0.3/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Gleap.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,30 @@ class Gleap {
693693
GleapFrameManager.getInstance().showWidget();
694694
}
695695

696+
/**
697+
* Starts a new conversation and attaches the bot with the given id.
698+
*/
699+
static startBot(botId, showBackButton = true) {
700+
if (!botId) {
701+
return;
702+
}
703+
704+
GleapFrameManager.getInstance().setAppMode("widget");
705+
706+
GleapFrameManager.getInstance().sendMessage(
707+
{
708+
name: "start-bot",
709+
data: {
710+
botId,
711+
hideBackButton: !showBackButton,
712+
},
713+
},
714+
true
715+
);
716+
717+
GleapFrameManager.getInstance().showWidget();
718+
}
719+
696720
/**
697721
* Opens a help center collection
698722
*/

0 commit comments

Comments
 (0)