Skip to content

Commit

Permalink
v6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Oct 12, 2021
1 parent 1067b31 commit fdbff3a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/6.0.0/index.js

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,17 @@ class Gleap {
* Initializes the SDK
* @param {*} sdkKey
*/
static initialize(sdkKey) {
static initialize(sdkKey, gleapId, gleapHash) {
const instance = this.getInstance();

// Set default session (i.e. from the app SDK).
if (gleapId && gleapHash) {
try {
localStorage.setItem(`gleap-id`, gleapId);
localStorage.getItem(`gleap-hash`, gleapHash);
} catch (exp) {}
}

if (instance.initialized) {
console.warn("Gleap already initialized.");
return;
Expand Down Expand Up @@ -593,7 +601,10 @@ class Gleap {
instance.customLogoUrl,
instance.poweredByHidden,
function () {},
`${translateText("Hi", instance.overrideLanguage)} <span id="bb-user-name">${
`${translateText(
"Hi",
instance.overrideLanguage
)} <span id="bb-user-name">${
sessionInstance.session.name ? sessionInstance.session.name : ""
}</span> ${instance.welcomeIcon}`,
translateText(
Expand Down

0 comments on commit fdbff3a

Please sign in to comment.