@tiledesk/tiledesk-whatsapp-connector 0.1.59 → 0.1.60
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 +23 -25
- package/package.json +1 -1
- package/template/detail.html +9 -10
package/index.js
CHANGED
|
@@ -495,9 +495,9 @@ router.get("/direct/tiledesk", async (req, res) => {
|
|
|
495
495
|
.then((response) => {
|
|
496
496
|
winston.verbose(
|
|
497
497
|
"(wab) Message sent to WhatsApp! " +
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
498
|
+
response.status +
|
|
499
|
+
" " +
|
|
500
|
+
response.statusText
|
|
501
501
|
);
|
|
502
502
|
})
|
|
503
503
|
.catch((err) => {
|
|
@@ -592,9 +592,9 @@ router.post("/tiledesk/broadcast", async (req, res) => {
|
|
|
592
592
|
.then((response) => {
|
|
593
593
|
winston.verbose(
|
|
594
594
|
"(wab) Message sent to WhatsApp! " +
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
595
|
+
response.status +
|
|
596
|
+
" " +
|
|
597
|
+
response.statusText
|
|
598
598
|
);
|
|
599
599
|
messages_sent += 1;
|
|
600
600
|
i += 1;
|
|
@@ -853,9 +853,9 @@ router.post("/tiledesk", async (req, res) => {
|
|
|
853
853
|
.then((response) => {
|
|
854
854
|
winston.verbose(
|
|
855
855
|
"(wab) Message sent to WhatsApp! " +
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
response.status +
|
|
857
|
+
" " +
|
|
858
|
+
response.statusText
|
|
859
859
|
);
|
|
860
860
|
i += 1;
|
|
861
861
|
if (i < commands.length) {
|
|
@@ -905,9 +905,9 @@ router.post("/tiledesk", async (req, res) => {
|
|
|
905
905
|
.then((response) => {
|
|
906
906
|
winston.verbose(
|
|
907
907
|
"(wab) Message sent to WhatsApp! " +
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
908
|
+
response.status +
|
|
909
|
+
" " +
|
|
910
|
+
response.statusText
|
|
911
911
|
);
|
|
912
912
|
})
|
|
913
913
|
.catch((err) => {
|
|
@@ -978,7 +978,7 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
978
978
|
let settings = await db.get(CONTENT_KEY);
|
|
979
979
|
winston.debug("(wab) settings: ", settings);
|
|
980
980
|
*/
|
|
981
|
-
|
|
981
|
+
|
|
982
982
|
if (!settings) {
|
|
983
983
|
winston.verbose("(wab) No settings found. Exit..");
|
|
984
984
|
return res.sendStatus(200);
|
|
@@ -1139,8 +1139,8 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
1139
1139
|
if (!filename) {
|
|
1140
1140
|
winston.debug(
|
|
1141
1141
|
"(wab) Unable to download media with id " +
|
|
1142
|
-
|
|
1143
|
-
|
|
1142
|
+
media.id +
|
|
1143
|
+
". Message not sent."
|
|
1144
1144
|
);
|
|
1145
1145
|
return res
|
|
1146
1146
|
.status(500)
|
|
@@ -1165,8 +1165,8 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
1165
1165
|
if (!filename) {
|
|
1166
1166
|
winston.debug(
|
|
1167
1167
|
"(wab) Unable to download media with id " +
|
|
1168
|
-
|
|
1169
|
-
|
|
1168
|
+
media.id +
|
|
1169
|
+
". Message not sent."
|
|
1170
1170
|
);
|
|
1171
1171
|
return res
|
|
1172
1172
|
.status(500)
|
|
@@ -1191,8 +1191,8 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
1191
1191
|
if (!filename) {
|
|
1192
1192
|
winston.debug(
|
|
1193
1193
|
"(wab) Unable to download media with id " +
|
|
1194
|
-
|
|
1195
|
-
|
|
1194
|
+
media.id +
|
|
1195
|
+
". Message not sent."
|
|
1196
1196
|
);
|
|
1197
1197
|
return res
|
|
1198
1198
|
.status(500)
|
|
@@ -1217,8 +1217,8 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
1217
1217
|
if (!filename) {
|
|
1218
1218
|
winston.debug(
|
|
1219
1219
|
"(wab) Unable to download media with id " +
|
|
1220
|
-
|
|
1221
|
-
|
|
1220
|
+
media.id +
|
|
1221
|
+
". Message not sent."
|
|
1222
1222
|
);
|
|
1223
1223
|
return res
|
|
1224
1224
|
.status(500)
|
|
@@ -1284,7 +1284,7 @@ router.post("/webhook/:project_id", async (req, res) => {
|
|
|
1284
1284
|
let settings = await db.get(CONTENT_KEY);
|
|
1285
1285
|
winston.debug("(wab) settings: ", settings);
|
|
1286
1286
|
*/
|
|
1287
|
-
|
|
1287
|
+
|
|
1288
1288
|
const tdClient = new TiledeskClient({
|
|
1289
1289
|
projectId: project_id,
|
|
1290
1290
|
token: settings.token,
|
|
@@ -1605,9 +1605,7 @@ async function startApp(settings, callback) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
|
|
1607
1607
|
if (!settings.JOB_TOPIC_EXCHANGE) {
|
|
1608
|
-
winston.
|
|
1609
|
-
"(wab) JOB_TOPIC_EXCHANGE should be present. Using default value"
|
|
1610
|
-
);
|
|
1608
|
+
winston.info("(wab) JOB_TOPIC_EXCHANGE should be present. Using default value");
|
|
1611
1609
|
JOB_TOPIC_EXCHANGE = "tiledesk-whatsapp";
|
|
1612
1610
|
} else {
|
|
1613
1611
|
JOB_TOPIC_EXCHANGE = settings.JOB_TOPIC_EXCHANGE;
|
package/package.json
CHANGED
package/template/detail.html
CHANGED
|
@@ -216,9 +216,16 @@
|
|
|
216
216
|
|
|
217
217
|
<div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
|
|
218
218
|
<div>
|
|
219
|
-
<p
|
|
219
|
+
<p>Bug fixes and performance improvements</p>
|
|
220
220
|
</div>
|
|
221
|
-
<p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.
|
|
221
|
+
<p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.60</b></p>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
|
|
225
|
+
<div>
|
|
226
|
+
<p style="margin-bottom: 0px">Added Meta message forwarding</p>
|
|
227
|
+
</div>
|
|
228
|
+
<p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.59</b></p>
|
|
222
229
|
</div>
|
|
223
230
|
|
|
224
231
|
|
|
@@ -237,14 +244,6 @@
|
|
|
237
244
|
</div>
|
|
238
245
|
<p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.53</b></p>
|
|
239
246
|
</div>
|
|
240
|
-
|
|
241
|
-
<div style="width: 100%; display: flex; flex-direction: row; justify-content: space-between; margin-bottom: 15px;">
|
|
242
|
-
<div>
|
|
243
|
-
<p>Bug fixes and performance improvements</p>
|
|
244
|
-
</div>
|
|
245
|
-
<p style="font-size: 12px; color: #676767; margin-bottom: 0px;">Version <b>0.1.52</b></p>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
247
|
|
|
249
248
|
<hr style="margin-top: 50px; margin-bottom: 20px">
|
|
250
249
|
|