@tiledesk/tiledesk-server 2.4.31 → 2.4.33
Sign up to get free protection for your applications and to get access to all the features.
package/middleware/passport.js
CHANGED
@@ -459,7 +459,8 @@ if (enableGoogleSignin==true) {
|
|
459
459
|
passport.use(new GoogleStrategy({
|
460
460
|
clientID: googleClientId,
|
461
461
|
clientSecret: googleClientSecret,
|
462
|
-
callbackURL: googleCallbackURL // 'https://www.example.com/oauth2/redirect/google'
|
462
|
+
callbackURL: googleCallbackURL, // 'https://www.example.com/oauth2/redirect/google'
|
463
|
+
stateless: true
|
463
464
|
},
|
464
465
|
function(issuer, profile, cb) {
|
465
466
|
|
@@ -538,8 +539,15 @@ if (enableGoogleSignin==true) {
|
|
538
539
|
return cb(null, savedUser);
|
539
540
|
});
|
540
541
|
}).catch(function(err) {
|
541
|
-
|
542
|
-
|
542
|
+
// if (err.code == 11000) {
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
// } else {
|
547
|
+
winston.error("Error signup google ", err);
|
548
|
+
return cb(err);
|
549
|
+
// }
|
550
|
+
|
543
551
|
});
|
544
552
|
} else {
|
545
553
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tiledesk/tiledesk-server",
|
3
3
|
"description": "The Tiledesk server module",
|
4
|
-
"version": "2.4.
|
4
|
+
"version": "2.4.33",
|
5
5
|
"scripts": {
|
6
6
|
"start": "node ./bin/www",
|
7
7
|
"pretest": "mongodb-runner start",
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"@tiledesk/tiledesk-kaleyra-proxy": "^0.1.7",
|
45
45
|
"@tiledesk/tiledesk-messenger-connector": "0.1.9",
|
46
46
|
"@tiledesk/tiledesk-rasa-connector": "^1.0.10",
|
47
|
-
"@tiledesk/tiledesk-tybot-connector": "^0.1.
|
47
|
+
"@tiledesk/tiledesk-tybot-connector": "^0.1.86",
|
48
48
|
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.50",
|
49
49
|
"amqplib": "^0.5.5",
|
50
50
|
"app-root-path": "^3.0.0",
|
@@ -70,6 +70,7 @@ findUnresponsiveRequests() {
|
|
70
70
|
|
71
71
|
|
72
72
|
// TODO escludi i ticket offline
|
73
|
+
// var query = { };
|
73
74
|
var query = {hasBot:true, status: { $lt: 1000 }, createdAt: { $lte :new Date(Date.now() - this.queryAfterTimeout ).toISOString()} };
|
74
75
|
|
75
76
|
if (this.queryProject) {
|
@@ -106,11 +107,14 @@ findUnresponsiveRequests() {
|
|
106
107
|
|
107
108
|
requests.forEach(request => {
|
108
109
|
i++;
|
109
|
-
delay = that.delayBeforeClosing*i;
|
110
|
+
delay = 2*that.delayBeforeClosing*i;
|
111
|
+
winston.debug("CloseBotUnresponsiveRequestTask: delay : " + delay);
|
112
|
+
|
110
113
|
setTimeout(function(){
|
111
114
|
|
112
115
|
// TODO aggiungi uno sleep
|
113
|
-
winston.debug("********unresponsive request "
|
116
|
+
winston.debug("********unresponsive request : "+ request.first_text);
|
117
|
+
// winston.debug("********unresponsive request ", request);
|
114
118
|
|
115
119
|
// closeRequestByRequestId(request_id, id_project, skipStatsUpdate, notify, closed_by)
|
116
120
|
const closed_by = "_bot_unresponsive";
|
package/routes/files.js
CHANGED
@@ -81,7 +81,7 @@ router.get("/download", (req, res) => {
|
|
81
81
|
winston.debug('path', req.query.path);
|
82
82
|
// if (path.indexOf("/users/"))
|
83
83
|
let filename = pathlib.basename(req.query.path);
|
84
|
-
winston.
|
84
|
+
winston.debug("filename:"+filename);
|
85
85
|
|
86
86
|
res.attachment(filename);
|
87
87
|
fileService.getFileDataAsStream(req.query.path).pipe(res);
|