@tiledesk/tiledesk-server 2.2.30 → 2.2.31
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -1
- package/app.js +4 -1
- package/models/request.js +7 -1
- package/package.json +1 -1
- package/publiccode.yml +110 -0
- package/pubmodules/pubModulesManager.js +17 -0
- package/pubmodules/rasa/index.js +3 -0
- package/pubmodules/rasa/listener.js +51 -0
- package/pubmodules/rules/conciergeBot.js +1 -0
- package/routes/message.js +13 -8
- package/routes/project_user.js +4 -4
- package/routes/widget.js +30 -2
- package/services/emailService.js +38 -29
package/CHANGELOG.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
1
|
|
2
|
+
|
3
|
+
|
4
|
+
# 2.2.31 (compatible with: Dashboard 2.2.37, Widget 5.0.25)
|
5
|
+
- Fix email template reading from project.
|
6
|
+
- Added transcript webpage for users without system messages
|
7
|
+
- Fix export messages to csv
|
8
|
+
- Fix ip address resolver
|
9
|
+
- Exclude poweredBy field from widget endpoint
|
10
|
+
- Bugfix when a conversation has a first_text with \agent
|
11
|
+
- Added rasa chatbot chatbot type
|
12
|
+
- Added visitor email and fullname in the fulltext index
|
13
|
+
|
14
|
+
# 2.2.30 -> PROD
|
15
|
+
- Log fix
|
16
|
+
|
2
17
|
# 2.2.29
|
3
18
|
- Added endpoint to find requests created by users and guests
|
4
19
|
- Log fix
|
@@ -20,7 +35,7 @@
|
|
20
35
|
- Added endpoint to close a request by guest
|
21
36
|
|
22
37
|
|
23
|
-
# 2.2.26
|
38
|
+
# 2.2.26 (compatible with dasboard ver. 2.2.35)
|
24
39
|
- Tag fix for 2.2.25
|
25
40
|
|
26
41
|
# 2.2.25
|
package/app.js
CHANGED
@@ -320,7 +320,10 @@ var projectSetter = function (req, res, next) {
|
|
320
320
|
|
321
321
|
|
322
322
|
function customDetection (req) {
|
323
|
-
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
|
323
|
+
// const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
|
324
|
+
const ip = (req.headers['x-forwarded-for'] || '').split(',').pop().trim() || //https://stackoverflow.com/questions/8107856/how-to-determine-a-users-ip-address-in-node
|
325
|
+
req.socket.remoteAddress
|
326
|
+
|
324
327
|
winston.info("standard ip: "+ip); // ip address of the user
|
325
328
|
return ip;
|
326
329
|
}
|
package/models/request.js
CHANGED
@@ -254,6 +254,7 @@ var RequestSchema = new Schema({
|
|
254
254
|
required: false
|
255
255
|
},
|
256
256
|
location: LocationSchema,
|
257
|
+
|
257
258
|
id_project: {
|
258
259
|
type: String,
|
259
260
|
required: true,
|
@@ -417,7 +418,9 @@ RequestSchema.index({ id_project: 1, request_id: 1 }
|
|
417
418
|
// https://docs.mongodb.com/manual/reference/text-search-languages/#text-search-languages
|
418
419
|
|
419
420
|
//TODO cambiare dummy con language? attento che il codice deve essere compatibile
|
420
|
-
|
421
|
+
|
422
|
+
|
423
|
+
RequestSchema.index({transcript: 'text', rating_message: 'text', subject: 'text', "tags.tag": 'text', "notes.text": 'text', "snapshot.lead.email": 'text', "snapshot.lead.fullname": 'text' },
|
421
424
|
{"name":"request_fulltext","default_language": defaultFullTextLanguage,"language_override": "dummy"}); // schema level
|
422
425
|
|
423
426
|
// let query = {id_project: operatorSelectedEvent.id_project, participants: { $exists: true, $ne: [] }};
|
@@ -431,6 +434,9 @@ RequestSchema.index({ id_project: 1, preflight:1, updatedAt: -1 }); // used quer
|
|
431
434
|
|
432
435
|
RequestSchema.index({ hasBot: 1, createdAt: 1 }); // suggested by atlas
|
433
436
|
|
437
|
+
RequestSchema.index({ id_project: 1, ticket_id: 1 });
|
438
|
+
|
439
|
+
|
434
440
|
|
435
441
|
// cannot index parallel arrays [agents] [participants] {"driv
|
436
442
|
// RequestSchema.index({ id_project: 1, status: 1, preflight:1, participants:1, "agents.id_user":1, updatedAt: -1 }); //NN LO APPLICA
|
package/package.json
CHANGED
package/publiccode.yml
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
# This repository adheres to the publiccode.yml standard by including this
|
2
|
+
# metadata file that makes public software easily discoverable.
|
3
|
+
# More info at https://github.com/italia/publiccode.yml
|
4
|
+
|
5
|
+
publiccodeYmlVersion: '0.2'
|
6
|
+
categories:
|
7
|
+
- customer-service-and-support
|
8
|
+
- communications
|
9
|
+
- marketing
|
10
|
+
- mobile-marketing
|
11
|
+
description:
|
12
|
+
it:
|
13
|
+
apiDocumentation: 'https://developer.tiledesk.com/apis/rest-api'
|
14
|
+
documentation: 'https://gethelp.tiledesk.com'
|
15
|
+
features:
|
16
|
+
- live chat widget
|
17
|
+
- chatbot
|
18
|
+
- 'integration with DialogFlow, Rasa and all major AI solutions'
|
19
|
+
- ticketing
|
20
|
+
- multi-project management
|
21
|
+
- SLAs setting
|
22
|
+
- 'smart assignment of the queues '
|
23
|
+
- seamless conversation
|
24
|
+
- dashboard
|
25
|
+
- knowledge base
|
26
|
+
- mobile apps
|
27
|
+
genericName: Live chat with integrated chatbots
|
28
|
+
longDescription: |
|
29
|
+
To have fully satisfied customers is complex. Conversation’s actors
|
30
|
+
(chatbots and humans) should handoff to each other many times during a
|
31
|
+
chat to address customers needs.
|
32
|
+
|
33
|
+
|
34
|
+
Tiledesk provides a solution **orchestrating instant, asynchronous and
|
35
|
+
multichannel communication among all stakeholders of a typical
|
36
|
+
conversational architecture**: chatbots, support operators, end users,
|
37
|
+
colleagues, applications, etc.
|
38
|
+
|
39
|
+
|
40
|
+
**Main Features**:
|
41
|
+
|
42
|
+
|
43
|
+
- Live Chat Widget with full multichannel experience on Web and Mobile;
|
44
|
+
|
45
|
+
- Resolution Bot to automate customer support;
|
46
|
+
|
47
|
+
- Easy Integration with all major AI-platforms, cloud and Open source,
|
48
|
+
from DialogFlow to RASA;
|
49
|
+
|
50
|
+
- Ticketing Management system fully integrated into the platform and
|
51
|
+
instant conversation flow;
|
52
|
+
|
53
|
+
- Team Organization with multi-project management, SLAs setting, smart
|
54
|
+
assignment of the
|
55
|
+
queues, departments organization and much more;
|
56
|
+
- Seamless conversation to “jump” between different channels in a
|
57
|
+
transparent way for end
|
58
|
+
customers and agents;
|
59
|
+
- Chat Tools like typing indicator, off-line access, delivery receipts,
|
60
|
+
contact list and much more;
|
61
|
+
|
62
|
+
- Dashboard with real time analytics;
|
63
|
+
|
64
|
+
- Knowledge base.
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
Tiledesk is an **open source **project, made with passion in Salento
|
69
|
+
(Southern Italy).
|
70
|
+
shortDescription: |-
|
71
|
+
Tiledesk delivers scalable customer service to your mobile apps and your
|
72
|
+
website. It is a conversational platform that connects chatbots and
|
73
|
+
humans
|
74
|
+
developmentStatus: stable
|
75
|
+
it:
|
76
|
+
conforme:
|
77
|
+
gdpr: false
|
78
|
+
lineeGuidaDesign: false
|
79
|
+
misureMinimeSicurezza: false
|
80
|
+
modelloInteroperabilita: false
|
81
|
+
countryExtensionVersion: '0.2'
|
82
|
+
piattaforme:
|
83
|
+
anpr: false
|
84
|
+
cie: false
|
85
|
+
pagopa: false
|
86
|
+
spid: false
|
87
|
+
landingURL: 'https://tiledesk.com/install'
|
88
|
+
legal:
|
89
|
+
license: AGPL-3.0-only
|
90
|
+
localisation:
|
91
|
+
availableLanguages:
|
92
|
+
- it
|
93
|
+
- en
|
94
|
+
- es
|
95
|
+
- fr
|
96
|
+
- pt
|
97
|
+
- de
|
98
|
+
- ru
|
99
|
+
- tr
|
100
|
+
localisationReady: true
|
101
|
+
maintenance:
|
102
|
+
contacts:
|
103
|
+
- name: Andrea Sponziello
|
104
|
+
type: internal
|
105
|
+
name: Tiledesk
|
106
|
+
platforms:
|
107
|
+
- web
|
108
|
+
releaseDate: '2022-06-15'
|
109
|
+
softwareType: standalone/web
|
110
|
+
url: 'https://github.com/Tiledesk/tiledesk-deployment'
|
@@ -18,6 +18,8 @@ class PubModulesManager {
|
|
18
18
|
this.messageTransformer = undefined;
|
19
19
|
|
20
20
|
this.scheduler = undefined;
|
21
|
+
|
22
|
+
this.rasa = undefined;
|
21
23
|
}
|
22
24
|
|
23
25
|
|
@@ -140,6 +142,21 @@ class PubModulesManager {
|
|
140
142
|
}
|
141
143
|
|
142
144
|
|
145
|
+
try {
|
146
|
+
this.rasa = require('./rasa');
|
147
|
+
winston.debug("this.rasa:"+ this.rasa);
|
148
|
+
this.rasa.listener.listen();
|
149
|
+
winston.info("PubModulesManager initialized rasa.");
|
150
|
+
} catch(err) {
|
151
|
+
if (err.code == 'MODULE_NOT_FOUND') {
|
152
|
+
winston.info("PubModulesManager init rasa module not found");
|
153
|
+
}else {
|
154
|
+
winston.info("PubModulesManager error initializing init rasa module", err);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
|
143
160
|
|
144
161
|
|
145
162
|
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
const botEvent = require('../../event/botEvent');
|
2
|
+
var Faq_kb = require("../../models/faq_kb");
|
3
|
+
var winston = require('../../config/winston');
|
4
|
+
|
5
|
+
const BOT_RASA_ENDPOINT = process.env.BOT_RASA_ENDPOINT;
|
6
|
+
winston.debug("BOT_RASA_ENDPOINT: " + BOT_RASA_ENDPOINT);
|
7
|
+
|
8
|
+
if (BOT_RASA_ENDPOINT) {
|
9
|
+
winston.info("Rasa endpoint: " + BOT_RASA_ENDPOINT);
|
10
|
+
} else {
|
11
|
+
winston.info("Rasa endpoint not configured");
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
class Listener {
|
16
|
+
|
17
|
+
listen() {
|
18
|
+
|
19
|
+
winston.debug('rasa Listener listen');
|
20
|
+
|
21
|
+
var that = this;
|
22
|
+
|
23
|
+
botEvent.on('faqbot.create', function(bot) {
|
24
|
+
if (BOT_RASA_ENDPOINT) {
|
25
|
+
|
26
|
+
winston.info('bot.type:'+bot.type);
|
27
|
+
if (bot.type==="rasa") {
|
28
|
+
|
29
|
+
winston.info('qui.type:'+bot.type);
|
30
|
+
|
31
|
+
|
32
|
+
Faq_kb.findByIdAndUpdate(bot.id, {"url":BOT_RASA_ENDPOINT}, { new: true, upsert: true }, function (err, savedFaq_kb) {
|
33
|
+
|
34
|
+
// bot.save(function (err, savedFaq_kb) {
|
35
|
+
if (err) {
|
36
|
+
return winston.error('error saving faqkb rasa ', err)
|
37
|
+
}
|
38
|
+
winston.verbose('Saved faqkb rasa', savedFaq_kb.toObject())
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}
|
42
|
+
});
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
var listener = new Listener();
|
49
|
+
|
50
|
+
|
51
|
+
module.exports = listener;
|
@@ -338,6 +338,7 @@ devi mandare un messaggio welcome tu altrimenti il bot inserito successivamente
|
|
338
338
|
if (request.subject) {
|
339
339
|
touchText = request.subject;
|
340
340
|
}
|
341
|
+
touchText.replace("\\",""); //Bugfix when a conversation has a first_text with \agent
|
341
342
|
|
342
343
|
// messageService.send(sender, senderFullname, recipient, text, id_project, createdBy, attributes, type);
|
343
344
|
messageService.send(
|
package/routes/message.js
CHANGED
@@ -139,7 +139,7 @@ async (req, res) => {
|
|
139
139
|
.then(function(createdLead) {
|
140
140
|
|
141
141
|
|
142
|
-
|
142
|
+
|
143
143
|
var new_request = {
|
144
144
|
request_id: req.params.request_id,
|
145
145
|
project_user_id: project_user._id,
|
@@ -312,9 +312,20 @@ async (req, res) => {
|
|
312
312
|
// });
|
313
313
|
// });
|
314
314
|
|
315
|
+
router.get('/csv', function(req, res) {
|
316
|
+
|
317
|
+
// console.log("csv");
|
318
|
+
|
319
|
+
|
320
|
+
return Message.find({"recipient": req.params.request_id, id_project: req.projectid}).sort({createdAt: 'asc'}).exec(function(err, messages) {
|
321
|
+
if (err) return next(err);
|
322
|
+
res.csv(messages, true);
|
323
|
+
});
|
324
|
+
});
|
325
|
+
|
315
326
|
router.get('/:messageid', function(req, res) {
|
316
327
|
|
317
|
-
console.log(req.body);
|
328
|
+
// console.log(req.body);
|
318
329
|
|
319
330
|
Message.findById(req.params.messageid, function(err, message) {
|
320
331
|
if (err) {
|
@@ -337,13 +348,7 @@ router.get('/', function(req, res) {
|
|
337
348
|
});
|
338
349
|
});
|
339
350
|
|
340
|
-
router.get('/csv', function(req, res) {
|
341
351
|
|
342
|
-
return Message.find({"recipient": req.params.request_id, id_project: req.projectid}).sort({createdAt: 'asc'}).exec(function(err, messages) {
|
343
|
-
if (err) return next(err);
|
344
|
-
res.csv(messages, true);
|
345
|
-
});
|
346
|
-
});
|
347
352
|
|
348
353
|
|
349
354
|
module.exports = router;
|
package/routes/project_user.js
CHANGED
@@ -367,7 +367,7 @@ router.get('/:project_userid', [passport.authenticate(['basic', 'jwt'], { sessio
|
|
367
367
|
|
368
368
|
|
369
369
|
router.get('/users/search', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken, roleChecker.hasRoleOrTypes('agent', ['subscription'])], async (req, res, next) => {
|
370
|
-
winston.
|
370
|
+
winston.debug("--> users search ");
|
371
371
|
|
372
372
|
if (!req.project) {
|
373
373
|
return res.status(404).send({ success: false, msg: 'Project not found.' });
|
@@ -376,10 +376,10 @@ router.get('/users/search', [passport.authenticate(['basic', 'jwt'], { session:
|
|
376
376
|
|
377
377
|
let query = {email: req.query.email};
|
378
378
|
|
379
|
-
winston.
|
379
|
+
winston.debug('query: ', query);
|
380
380
|
|
381
381
|
let user = await User.findOne(query).exec();
|
382
|
-
winston.
|
382
|
+
winston.debug('user: ', user);
|
383
383
|
|
384
384
|
if (!user) {
|
385
385
|
return res.status(404).send({ success: false, msg: 'Object not found.' });
|
@@ -387,7 +387,7 @@ router.get('/users/search', [passport.authenticate(['basic', 'jwt'], { session:
|
|
387
387
|
|
388
388
|
|
389
389
|
let project_user = await Project_user.findOne({id_user: user._id, id_project: req.projectid}).exec();
|
390
|
-
winston.
|
390
|
+
winston.debug('project_user: ', project_user);
|
391
391
|
|
392
392
|
if (!project_user) {
|
393
393
|
return res.status(403).json({msg: "Unauthorized. This is not a your teammate." });
|
package/routes/widget.js
CHANGED
@@ -114,10 +114,38 @@ router.get('/', function(req, res, next) {
|
|
114
114
|
|
115
115
|
}
|
116
116
|
|
117
|
+
|
118
|
+
var getProject = function(req) {
|
119
|
+
winston.info('getProject.');
|
120
|
+
|
121
|
+
return new Promise(function (resolve, reject) {
|
122
|
+
|
123
|
+
//@DISABLED_CACHE .cache(cacheUtil.queryTTL, "projects:query:id:status:100:"+req.projectid+":select:-settings")
|
124
|
+
|
125
|
+
Project.findOne({_id: req.projectid, status: 100}).select('-settings -ipFilter -ipFilterEnabled').exec(function(err, project) {
|
126
|
+
// not use .lean I need project.trialExpired
|
127
|
+
|
128
|
+
if (err) {
|
129
|
+
return reject({err: "Project Not Found"});
|
130
|
+
}
|
131
|
+
|
132
|
+
if (project && project.profile && (project.profile.type === 'free' && project.trialExpired === true) || (project.profile.type === 'payment' && project.isActiveSubscription === false)) {
|
133
|
+
winston.info('getProject remove poweredBy tag', project);
|
134
|
+
project.widget.poweredBy = undefined;
|
135
|
+
project.widget.baloonImage = undefined;
|
136
|
+
}
|
137
|
+
|
138
|
+
return resolve(project);
|
139
|
+
});
|
140
|
+
|
141
|
+
});
|
142
|
+
|
143
|
+
}
|
144
|
+
|
117
145
|
// TOOD add labels
|
118
146
|
Promise.all([
|
119
|
-
|
120
|
-
|
147
|
+
|
148
|
+
getProject(req)
|
121
149
|
,
|
122
150
|
availableUsers()
|
123
151
|
,
|
package/services/emailService.js
CHANGED
@@ -98,13 +98,13 @@ class EmailService {
|
|
98
98
|
this.host = process.env.EMAIL_HOST || config.host;
|
99
99
|
winston.info('EmailService host: ' + this.host);
|
100
100
|
|
101
|
-
this.secure = process.env.EMAIL_SECURE || false;
|
101
|
+
this.secure = process.env.EMAIL_SECURE || false;
|
102
102
|
winston.info('EmailService secure: ' + this.secure);
|
103
103
|
|
104
104
|
this.user = process.env.EMAIL_USERNAME || config.username;
|
105
105
|
winston.info('EmailService username: ' + this.user);
|
106
106
|
|
107
|
-
this.port = process.env.EMAIL_PORT;
|
107
|
+
this.port = process.env.EMAIL_PORT; //default is 587
|
108
108
|
winston.info('EmailService port: ' + this.port);
|
109
109
|
|
110
110
|
|
@@ -123,11 +123,19 @@ class EmailService {
|
|
123
123
|
var that = this;
|
124
124
|
winston.debug('EmailService readTemplate: '+ templateName + ' ' + JSON.stringify(settings));
|
125
125
|
|
126
|
+
|
126
127
|
if (settings && settings.email && settings.email.templates) {
|
128
|
+
|
127
129
|
var templates = settings.email.templates;
|
128
130
|
winston.debug('EmailService templates: ',templates);
|
129
|
-
|
131
|
+
|
132
|
+
var templateDbName = templateName.replace(".html", "");
|
133
|
+
winston.debug('EmailService templateDbName: '+templateDbName);
|
134
|
+
|
135
|
+
|
136
|
+
var template = templates[templateDbName];
|
130
137
|
winston.debug('EmailService template: '+template);
|
138
|
+
|
131
139
|
if (template) {
|
132
140
|
// that.callback(template);
|
133
141
|
return new Promise(function (resolve, reject) {
|
@@ -240,7 +248,6 @@ class EmailService {
|
|
240
248
|
};
|
241
249
|
|
242
250
|
winston.debug('mailOptions', mailOptions);
|
243
|
-
|
244
251
|
if (!mail.to) {
|
245
252
|
return winston.warn("EmailService send method. to field is not defined", mailOptions);
|
246
253
|
}
|
@@ -273,7 +280,7 @@ class EmailService {
|
|
273
280
|
|
274
281
|
var that = this;
|
275
282
|
|
276
|
-
var html = await this.
|
283
|
+
var html = await this.readTemplate('test.html',{ "email" : {"templates": {test: "123"}}});
|
277
284
|
|
278
285
|
var template = handlebars.compile(html);
|
279
286
|
|
@@ -282,7 +289,7 @@ class EmailService {
|
|
282
289
|
|
283
290
|
var html = template(replacements);
|
284
291
|
|
285
|
-
return that.send({to:to, subject:`
|
292
|
+
return that.send({to:to, subject:`Tiledesk test email`, config: configEmail, html: html, callback: callback});
|
286
293
|
|
287
294
|
}
|
288
295
|
|
@@ -399,10 +406,12 @@ class EmailService {
|
|
399
406
|
}
|
400
407
|
}
|
401
408
|
|
402
|
-
|
409
|
+
|
410
|
+
|
411
|
+
let subject = `[Tiledesk ${project ? project.name : '-'}] New Assigned Chat`;
|
403
412
|
|
404
413
|
if (request.subject) {
|
405
|
-
subject = `[
|
414
|
+
subject = `[Tiledesk ${project ? project.name : '-'}] ${request.subject}`;
|
406
415
|
}
|
407
416
|
|
408
417
|
// if (request.ticket_id) {
|
@@ -546,10 +555,10 @@ class EmailService {
|
|
546
555
|
}
|
547
556
|
|
548
557
|
|
549
|
-
let subject = `[
|
558
|
+
let subject = `[Tiledesk ${project ? project.name : '-'}] New message`;
|
550
559
|
|
551
560
|
if (request.subject) {
|
552
|
-
subject = `[
|
561
|
+
subject = `[Tiledesk ${project ? project.name : '-'}] ${request.subject}`;
|
553
562
|
}
|
554
563
|
if (request.ticket_id) {
|
555
564
|
subject = `[Ticket #${request.ticket_id}] New message`;
|
@@ -690,10 +699,10 @@ class EmailService {
|
|
690
699
|
}
|
691
700
|
}
|
692
701
|
|
693
|
-
let subject = `[
|
702
|
+
let subject = `[Tiledesk ${project ? project.name : '-'}] New Pooled Chat`;
|
694
703
|
|
695
704
|
if (request.subject) {
|
696
|
-
subject = `[
|
705
|
+
subject = `[Tiledesk ${project ? project.name : '-'}] ${request.subject}`;
|
697
706
|
}
|
698
707
|
// if (request.ticket_id) {
|
699
708
|
// subject = `[Ticket #${request.ticket_id}] New Pooled Chat`;
|
@@ -831,10 +840,10 @@ class EmailService {
|
|
831
840
|
}
|
832
841
|
|
833
842
|
|
834
|
-
let subject = `[
|
843
|
+
let subject = `[Tiledesk ${project ? project.name : '-'}] New Message`;
|
835
844
|
|
836
845
|
if (request.subject) {
|
837
|
-
subject = `[
|
846
|
+
subject = `[Tiledesk ${project ? project.name : '-'}] ${request.subject}`;
|
838
847
|
}
|
839
848
|
if (request.ticket_id) {
|
840
849
|
subject = `[Ticket #${request.ticket_id}] New Message`;
|
@@ -982,7 +991,7 @@ class EmailService {
|
|
982
991
|
replyTo: replyTo,
|
983
992
|
inReplyTo: inReplyTo,
|
984
993
|
references: references,
|
985
|
-
subject:`[
|
994
|
+
subject:`[Tiledesk ${project ? project.name : '-'}] New Offline Message`,
|
986
995
|
html:html,
|
987
996
|
config:configEmail,
|
988
997
|
headers: headers
|
@@ -997,7 +1006,7 @@ class EmailService {
|
|
997
1006
|
replyTo: replyTo,
|
998
1007
|
inReplyTo: inReplyTo,
|
999
1008
|
references: references,
|
1000
|
-
subject: `[
|
1009
|
+
subject: `[Tiledesk ${project ? project.name : '-'}] New Offline Message - notification`,
|
1001
1010
|
html:html,
|
1002
1011
|
headers: headers
|
1003
1012
|
});
|
@@ -1247,8 +1256,8 @@ class EmailService {
|
|
1247
1256
|
var html = template(replacements);
|
1248
1257
|
|
1249
1258
|
|
1250
|
-
that.send({to: to, subject: '[
|
1251
|
-
that.send({to:that.bcc, subject: '[
|
1259
|
+
that.send({to: to, subject: '[Tiledesk] Password reset request', html:html});
|
1260
|
+
that.send({to:that.bcc, subject: '[Tiledesk] Password reset request - notification', html:html });
|
1252
1261
|
|
1253
1262
|
}
|
1254
1263
|
|
@@ -1285,8 +1294,8 @@ class EmailService {
|
|
1285
1294
|
var html = template(replacements);
|
1286
1295
|
|
1287
1296
|
|
1288
|
-
that.send({to: to, subject:'[
|
1289
|
-
that.send({to: that.bcc, subject: '[
|
1297
|
+
that.send({to: to, subject:'[Tiledesk] Your password has been changed', html:html });
|
1298
|
+
that.send({to: that.bcc, subject: '[Tiledesk] Your password has been changed - notification', html: html });
|
1290
1299
|
|
1291
1300
|
}
|
1292
1301
|
|
@@ -1332,8 +1341,8 @@ class EmailService {
|
|
1332
1341
|
var html = template(replacements);
|
1333
1342
|
|
1334
1343
|
|
1335
|
-
that.send({to:to, subject: `[
|
1336
|
-
that.send({to: that.bcc, subject: `[
|
1344
|
+
that.send({to:to, subject: `[Tiledesk] You have been invited to the '${projectName}' project`, html:html});
|
1345
|
+
that.send({to: that.bcc, subject: `[Tiledesk] You have been invited to the '${projectName}' project - notification`, html: html});
|
1337
1346
|
}
|
1338
1347
|
|
1339
1348
|
// ok
|
@@ -1376,8 +1385,8 @@ class EmailService {
|
|
1376
1385
|
|
1377
1386
|
var html = template(replacements);
|
1378
1387
|
|
1379
|
-
that.send({to:to, subject: `[
|
1380
|
-
that.send({to: that.bcc, subject: `[
|
1388
|
+
that.send({to:to, subject: `[Tiledesk] You have been invited to the '${projectName}' project`, html:html });
|
1389
|
+
that.send({to: that.bcc, subject: `[Tiledesk] You have been invited to the '${projectName}' project - notification`, html: html});
|
1381
1390
|
|
1382
1391
|
}
|
1383
1392
|
|
@@ -1415,8 +1424,8 @@ class EmailService {
|
|
1415
1424
|
var html = template(replacements);
|
1416
1425
|
|
1417
1426
|
|
1418
|
-
that.send({to: to, subject: `[
|
1419
|
-
that.send({to: that.bcc, subject: `[
|
1427
|
+
that.send({to: to, subject: `[Tiledesk] Verify your email address`, html:html });
|
1428
|
+
that.send({to: that.bcc, subject: `[Tiledesk] Verify your email address `+to + " - notification", html:html });
|
1420
1429
|
|
1421
1430
|
}
|
1422
1431
|
|
@@ -1483,8 +1492,8 @@ async sendRequestTranscript(to, messages, request, project) {
|
|
1483
1492
|
winston.verbose("custom email setting found: ", configEmail);
|
1484
1493
|
}
|
1485
1494
|
|
1486
|
-
that.send({to:to, subject: '[
|
1487
|
-
that.send({to: that.bcc, subject: '[
|
1495
|
+
that.send({to:to, subject: '[Tiledesk] Transcript', html:html, config: configEmail});
|
1496
|
+
that.send({to: that.bcc, subject: '[Tiledesk] Transcript - notification', html:html });
|
1488
1497
|
|
1489
1498
|
}
|
1490
1499
|
|
@@ -1496,6 +1505,6 @@ async sendRequestTranscript(to, messages, request, project) {
|
|
1496
1505
|
|
1497
1506
|
var emailService = new EmailService();
|
1498
1507
|
|
1499
|
-
//emailService.sendTest("al@f21.it");
|
1508
|
+
// emailService.sendTest("al@f21.it");
|
1500
1509
|
|
1501
1510
|
module.exports = emailService;
|