only show intercom in cloud
This commit is contained in:
parent
f8cc7db075
commit
0975fa6413
2 changed files with 8 additions and 6 deletions
|
@ -53,13 +53,13 @@ export default class IntercomClient {
|
|||
* @returns Intercom global object
|
||||
*/
|
||||
show(user = {}) {
|
||||
if (!this.initialised || !user?.admin) return
|
||||
|
||||
if (this.initialised && user?.admin && user?.cloud) {
|
||||
return window.Intercom("boot", {
|
||||
app_id: this.token,
|
||||
...user,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update intercom user details and messages.
|
||||
|
|
|
@ -54,6 +54,7 @@ export function createAuthStore() {
|
|||
})
|
||||
|
||||
if (user) {
|
||||
const adminStore = get(admin)
|
||||
analytics
|
||||
.activate()
|
||||
.then(() => {
|
||||
|
@ -68,6 +69,7 @@ export function createAuthStore() {
|
|||
builder: user?.builder?.global,
|
||||
"Company size": user.account?.size,
|
||||
"Job role": user.account?.profession,
|
||||
cloud: adminStore.cloud,
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
Loading…
Reference in a new issue