Skip to content

Commit fdbff3a

Browse files
committed
v6.0.0
1 parent 1067b31 commit fdbff3a

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
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.

published/6.0.0/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: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,17 @@ class Gleap {
120120
* Initializes the SDK
121121
* @param {*} sdkKey
122122
*/
123-
static initialize(sdkKey) {
123+
static initialize(sdkKey, gleapId, gleapHash) {
124124
const instance = this.getInstance();
125125

126+
// Set default session (i.e. from the app SDK).
127+
if (gleapId && gleapHash) {
128+
try {
129+
localStorage.setItem(`gleap-id`, gleapId);
130+
localStorage.getItem(`gleap-hash`, gleapHash);
131+
} catch (exp) {}
132+
}
133+
126134
if (instance.initialized) {
127135
console.warn("Gleap already initialized.");
128136
return;
@@ -593,7 +601,10 @@ class Gleap {
593601
instance.customLogoUrl,
594602
instance.poweredByHidden,
595603
function () {},
596-
`${translateText("Hi", instance.overrideLanguage)} <span id="bb-user-name">${
604+
`${translateText(
605+
"Hi",
606+
instance.overrideLanguage
607+
)} <span id="bb-user-name">${
597608
sessionInstance.session.name ? sessionInstance.session.name : ""
598609
}</span> ${instance.welcomeIcon}`,
599610
translateText(

0 commit comments

Comments
 (0)