@tiledesk/tiledesk-whatsapp-connector 0.1.62 → 0.1.64

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/index.js CHANGED
@@ -742,6 +742,11 @@ router.post("/tiledesk", async (req, res) => {
742
742
  return res.sendStatus(200);
743
743
  }
744
744
 
745
+ if (attributes && attributes.subtype === "private") {
746
+ winston.verbose("(wab) Skip subtype (private)");
747
+ return res.sendStatus(200);
748
+ }
749
+
745
750
  if (attributes && attributes.subtype === "info/support") {
746
751
  winston.verbose("(wab) Skip subtype: " + attributes.subtype);
747
752
  return res.sendStatus(200);
package/logs/app.log CHANGED
@@ -0,0 +1,2 @@
1
+ info: (wab) Starting Whatsapp App
2
+ error: (wab) MONGODB_URL is mandatory. Exit...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-whatsapp-connector",
3
- "version": "0.1.62",
3
+ "version": "0.1.64",
4
4
  "description": "Tiledesk Whatsapp connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -65,8 +65,8 @@
65
65
  {{else}}
66
66
  <p style="font-size: 15px; color: #676767; font-style: italic; margin-bottom: 0px; margin-top: 20px;">Free for</p>
67
67
  <div class="plans-div">
68
- <div class="plan scale-plan">Scale Plan</div>
69
- <div class="plan plus-plan">Plus Plan</div>
68
+ <div class="plan scale-plan">Premium Plan</div>
69
+ <div class="plan plus-plan">Custom Plan</div>
70
70
  </div>
71
71
  {{/if}}
72
72
  </div>
@@ -214,44 +214,34 @@
214
214
 
215
215
  <p style="font-size: 18px;"><b>What's new?</b></p>
216
216
 
217
- <div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
218
- <div>
219
- <p>Fixed bug: custom authentication error</p>
220
- </div>
221
- <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.62</b></p>
222
- </div>
223
-
224
217
  <div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
225
218
  <div>
226
219
  <p>Bug fixes and performance improvements</p>
227
220
  </div>
228
- <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.61</b></p>
221
+ <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.64</b></p>
229
222
  </div>
230
223
 
231
224
  <div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
232
225
  <div>
233
- <p>Bug fixes and performance improvements</p>
226
+ <p>Plans upgrade</p>
234
227
  </div>
235
- <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.60</b></p>
228
+ <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.63</b></p>
236
229
  </div>
237
230
 
238
231
  <div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
239
232
  <div>
240
- <p style="margin-bottom: 0px">Added Meta message forwarding</p>
233
+ <p>Fixed bug: custom authentication error</p>
241
234
  </div>
242
- <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.59</b></p>
235
+ <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.62</b></p>
243
236
  </div>
244
237
 
245
-
246
238
  <div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
247
239
  <div>
248
- <p>Added Messages Logs for WhatsApp broadcast</p>
249
- <p>Added Queue Manager for Whatsapp broadcast</p>
250
240
  <p>Bug fixes and performance improvements</p>
251
241
  </div>
252
- <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.55</b></p>
242
+ <p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.61</b></p>
253
243
  </div>
254
-
244
+
255
245
  <hr style="margin-top: 50px; margin-bottom: 20px">
256
246
 
257
247
  <script>
@@ -251,17 +251,17 @@ class TiledeskChannel {
251
251
 
252
252
  return new Promise((resolve, reject) => {
253
253
  if (
254
- (profile_name === 'Growth') ||
255
- (profile_name === 'Scale' && isActiveSubscription === false) ||
256
- (profile_name === 'Plus' && isActiveSubscription === false) ||
254
+ ((profile_name === 'Growth' || profile_name === 'Basic')) ||
255
+ ((profile_name === 'Scale' || profile_name === 'Premium') && isActiveSubscription === false) ||
256
+ ((profile_name === 'Plus' || profile_name === 'Custom') && isActiveSubscription === false) ||
257
257
  (profile_type === 'free' && trialExpired === true)
258
258
  ) {
259
259
  winston.verbose('Feature not available')
260
260
  resolve(false);
261
261
 
262
262
  } else if (
263
- (profile_name === 'Scale' && isActiveSubscription === true) ||
264
- (profile_name === 'Plus' && isActiveSubscription === true) ||
263
+ ((profile_name === 'Scale' || profile_name === 'Premium') && isActiveSubscription === true) ||
264
+ ((profile_name === 'Plus' || profile_name === 'Custom') && isActiveSubscription === true) ||
265
265
  (profile_type === 'free' && trialExpired === false)
266
266
  ) {
267
267
  winston.verbose('Feature available')
@@ -261,6 +261,7 @@ const path = require('path');
261
261
  }
262
262
  else if (tiledeskChannelMessage.attributes.attachment.template) {
263
263
  winston.debug("(wab) [Translator] template: ", tiledeskChannelMessage.attributes.attachment.template)
264
+ console.log("(wab) [Translator] template: ", tiledeskChannelMessage.attributes.attachment.template)
264
265
 
265
266
  let template = tiledeskChannelMessage.attributes.attachment.template;
266
267