@meetelise/chat 1.22.43 → 1.22.45

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.22.43",
3
+ "version": "1.22.45",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -252,6 +252,9 @@ export class MEChat extends LitElement {
252
252
  console.warn("Error updating rentgrata token", e);
253
253
  }
254
254
  }
255
+ // const conversationMaintenanceMode = await fetchFeatureFlagMaintenanceMode(
256
+ // this.buildingSlug
257
+ // );
255
258
  if (!building.conversationMaintenanceMode) {
256
259
  // eslint-disable-next-line no-console
257
260
  console.warn(
@@ -20,6 +20,31 @@ export enum FeatureFlagsShowDropdown {
20
20
  always = "always",
21
21
  }
22
22
 
23
+ export async function fetchFeatureFlagMaintenanceMode(
24
+ buildingSlug: string
25
+ ): Promise<boolean> {
26
+ if (!buildingSlug) {
27
+ return false;
28
+ }
29
+ try {
30
+ const featureFlagResponse = await axios.get(
31
+ featureFlagEndpointV1(buildingSlug),
32
+ {
33
+ params: {
34
+ building_slug: buildingSlug,
35
+ flag_type: "bool",
36
+ feature_flag: "conversation-maintenance-mode",
37
+ default_str: null,
38
+ default_bool: false,
39
+ },
40
+ }
41
+ );
42
+ return featureFlagResponse.data;
43
+ } catch (_) {
44
+ return false;
45
+ }
46
+ }
47
+
23
48
  export async function fetchFeatureFlagShowMarketingSourceDropdown(
24
49
  buildingSlug: string
25
50
  ): Promise<FeatureFlagsShowDropdown> {