Merge pull request #6722 from Budibase/fix/intercom-self-host-only
only show intercom in cloud
This commit is contained in:
commit
9cef8a87aa
|
@ -53,12 +53,12 @@ export default class IntercomClient {
|
||||||
* @returns Intercom global object
|
* @returns Intercom global object
|
||||||
*/
|
*/
|
||||||
show(user = {}) {
|
show(user = {}) {
|
||||||
if (!this.initialised || !user?.admin) return
|
if (this.initialised && user?.admin && user?.cloud) {
|
||||||
|
return window.Intercom("boot", {
|
||||||
return window.Intercom("boot", {
|
app_id: this.token,
|
||||||
app_id: this.token,
|
...user,
|
||||||
...user,
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -54,6 +54,7 @@ export function createAuthStore() {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
|
const adminStore = get(admin)
|
||||||
analytics
|
analytics
|
||||||
.activate()
|
.activate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -68,6 +69,7 @@ export function createAuthStore() {
|
||||||
builder: user?.builder?.global,
|
builder: user?.builder?.global,
|
||||||
"Company size": user.account?.size,
|
"Company size": user.account?.size,
|
||||||
"Job role": user.account?.profession,
|
"Job role": user.account?.profession,
|
||||||
|
cloud: adminStore.cloud,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
Loading…
Reference in New Issue