@smartico/public-api 0.0.247 → 0.0.249

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.
@@ -2627,14 +2627,9 @@ class SmarticoAPI {
2627
2627
  return C_SOCKET_PROD.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
2628
2628
  }
2629
2629
  static getAvatarUrl(label_api_key) {
2630
- const envId = SmarticoAPI.getEnvDnsSuffix(label_api_key);
2630
+ SmarticoAPI.getEnvDnsSuffix(label_api_key);
2631
2631
  const avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
2632
- const envs = ['4', '5', '6', '7'];
2633
- if (envs.includes(envId)) {
2634
- return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
2635
- } else {
2636
- return avatarUrl;
2637
- }
2632
+ return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
2638
2633
  }
2639
2634
  async send(message, expectCID, force_language) {
2640
2635
  if (this.logCIDs.includes(message.cid)) {
@@ -2647,11 +2642,8 @@ class SmarticoAPI {
2647
2642
  try {
2648
2643
  const timeStart = new Date().getTime();
2649
2644
  result = await this.messageSender(message, this.publicUrl, expectCID);
2645
+ result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
2650
2646
  const timeEnd = new Date().getTime();
2651
- const envs = ['4', '5', '6', '7'];
2652
- if (envs.includes(SmarticoAPI.getEnvDnsSuffix(this.label_api_key)) && result) {
2653
- result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
2654
- }
2655
2647
  if (this.logHTTPTiming) {
2656
2648
  this.logger.always('HTTP time, ms:' + (timeEnd - timeStart));
2657
2649
  }