@meetelise/chat 1.20.76 → 1.20.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/dist/index.js +68 -68
- package/src/WebComponent/me-chat.ts +18 -12
|
@@ -85,18 +85,6 @@ export class MEChat extends LitElement {
|
|
|
85
85
|
border-right: 30px solid black;
|
|
86
86
|
}
|
|
87
87
|
`;
|
|
88
|
-
static session: Promise<Talk.Session> = Talk.ready.then(() => {
|
|
89
|
-
const me = new Talk.User({
|
|
90
|
-
id: "anonymous",
|
|
91
|
-
name: "Me",
|
|
92
|
-
email: null,
|
|
93
|
-
role: "Default",
|
|
94
|
-
});
|
|
95
|
-
return new Talk.Session({
|
|
96
|
-
appId: "ogKIvCor",
|
|
97
|
-
me,
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
88
|
@property({ type: String })
|
|
101
89
|
private buildingSlug = "";
|
|
102
90
|
@property({ type: String })
|
|
@@ -113,6 +101,8 @@ export class MEChat extends LitElement {
|
|
|
113
101
|
@property({ type: Boolean })
|
|
114
102
|
isMinimized = false;
|
|
115
103
|
|
|
104
|
+
static session: Promise<Talk.Session> | null = null;
|
|
105
|
+
|
|
116
106
|
@property({ type: String })
|
|
117
107
|
private brandColor: string | null = null;
|
|
118
108
|
|
|
@@ -157,6 +147,19 @@ export class MEChat extends LitElement {
|
|
|
157
147
|
launcherRef: Ref<Launcher> = createRef();
|
|
158
148
|
|
|
159
149
|
initializeInstanceVariables = async (): Promise<void> => {
|
|
150
|
+
MEChat.session = Talk.ready.then(() => {
|
|
151
|
+
const me = new Talk.User({
|
|
152
|
+
id: "anonymous-" + getChatID(this.orgSlug, this.buildingSlug),
|
|
153
|
+
name: "Me",
|
|
154
|
+
email: null,
|
|
155
|
+
role: "Default",
|
|
156
|
+
});
|
|
157
|
+
return new Talk.Session({
|
|
158
|
+
appId: "ogKIvCor",
|
|
159
|
+
me,
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
160
163
|
await this.setBuildingDerivedInfo();
|
|
161
164
|
await this.initializeLaunchJS();
|
|
162
165
|
this.attachOnClickToLauncher();
|
|
@@ -267,6 +270,9 @@ export class MEChat extends LitElement {
|
|
|
267
270
|
);
|
|
268
271
|
});
|
|
269
272
|
}
|
|
273
|
+
if (!session) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
270
276
|
await this.configureTalkJSPopup(building, theme, session, avatarSrc);
|
|
271
277
|
this.configureLauncherElement();
|
|
272
278
|
|