@smartico/public-api 0.0.238 → 0.0.239
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/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +4 -2
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SmarticoAPI.ts +4 -3
package/package.json
CHANGED
package/src/SmarticoAPI.ts
CHANGED
|
@@ -244,8 +244,8 @@ class SmarticoAPI {
|
|
|
244
244
|
public static getAvatarUrl(label_api_key: string): string {
|
|
245
245
|
const envId = SmarticoAPI.getEnvDnsSuffix(label_api_key);
|
|
246
246
|
const avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
|
|
247
|
-
|
|
248
|
-
if (envId
|
|
247
|
+
const envs = ['4', '5', '6', '7'];
|
|
248
|
+
if (envs.includes(envId)) {
|
|
249
249
|
return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
|
|
250
250
|
} else {
|
|
251
251
|
return avatarUrl;
|
|
@@ -267,8 +267,9 @@ class SmarticoAPI {
|
|
|
267
267
|
const timeStart = new Date().getTime();
|
|
268
268
|
result = await this.messageSender(message, this.publicUrl, expectCID);
|
|
269
269
|
const timeEnd = new Date().getTime();
|
|
270
|
+
const envs = ['4', '5', '6', '7'];
|
|
270
271
|
|
|
271
|
-
if (SmarticoAPI.getEnvDnsSuffix(this.label_api_key)
|
|
272
|
+
if (envs.includes(SmarticoAPI.getEnvDnsSuffix(this.label_api_key)) && result) {
|
|
272
273
|
result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
|
|
273
274
|
}
|
|
274
275
|
|