@tiledesk/tiledesk-server 2.4.74 → 2.4.76
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
|
7
7
|
|
|
8
|
+
# 2.4.76
|
|
9
|
+
- update tybot-connector to 0.2.25
|
|
10
|
+
- update redirectToDesktop email for new onboarding
|
|
11
|
+
|
|
8
12
|
# 2.4.74
|
|
9
13
|
- update tiledesk-messenger-connector to 0.1.12
|
|
10
14
|
|
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.76",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "node ./bin/www",
|
|
7
7
|
"pretest": "mongodb-runner start",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@tiledesk/tiledesk-json-rules-engine": "^4.0.3",
|
|
44
44
|
"@tiledesk/tiledesk-kaleyra-proxy": "^0.1.7",
|
|
45
45
|
"@tiledesk/tiledesk-rasa-connector": "^1.0.10",
|
|
46
|
-
"@tiledesk/tiledesk-tybot-connector": "^0.2.
|
|
46
|
+
"@tiledesk/tiledesk-tybot-connector": "^0.2.25",
|
|
47
47
|
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.52",
|
|
48
48
|
"@tiledesk/tiledesk-messenger-connector": "^0.1.12",
|
|
49
|
-
"@tiledesk/tiledesk-telegram-connector": "^0.1.
|
|
49
|
+
"@tiledesk/tiledesk-telegram-connector": "^0.1.9",
|
|
50
50
|
"amqplib": "^0.5.5",
|
|
51
51
|
"app-root-path": "^3.0.0",
|
|
52
52
|
"bcrypt-nodejs": "0.0.3",
|
package/routes/users.js
CHANGED
|
@@ -192,17 +192,23 @@ router.post('/loginemail', function (req, res) {
|
|
|
192
192
|
let token = req.headers.authorization;
|
|
193
193
|
|
|
194
194
|
let project_id = req.body.id_project;
|
|
195
|
+
let chatbot_id = req.body.bot_id;
|
|
196
|
+
|
|
195
197
|
if (!project_id) {
|
|
196
198
|
res.status(500).send({ success: false, error: "missing 'id_project' field" })
|
|
197
199
|
}
|
|
198
200
|
|
|
201
|
+
if (!chatbot_id) {
|
|
202
|
+
res.status(500).send({ success: false, error: "missing 'bot_id' field" });
|
|
203
|
+
}
|
|
204
|
+
|
|
199
205
|
User.findById(user_id, (err, user) => {
|
|
200
206
|
if (err) {
|
|
201
207
|
return res.status(404).send({ success: false, message: "No user found" });
|
|
202
208
|
}
|
|
203
209
|
winston.debug("user found: ", user);
|
|
204
210
|
|
|
205
|
-
emailService.sendEmailRedirectOnDesktop(user.email, token, project_id,
|
|
211
|
+
emailService.sendEmailRedirectOnDesktop(user.email, token, project_id, chatbot_id)
|
|
206
212
|
return res.status(200).send({ success: true, message: "Sending email..."})
|
|
207
213
|
})
|
|
208
214
|
|
package/services/emailService.js
CHANGED
|
@@ -1851,7 +1851,7 @@ async sendRequestTranscript(to, messages, request, project) {
|
|
|
1851
1851
|
|
|
1852
1852
|
}
|
|
1853
1853
|
|
|
1854
|
-
async sendEmailRedirectOnDesktop(to, token, project_id) {
|
|
1854
|
+
async sendEmailRedirectOnDesktop(to, token, project_id, chatbot_id) {
|
|
1855
1855
|
winston.debug("sendEmailRedirectOnDesktop: " + to);
|
|
1856
1856
|
|
|
1857
1857
|
var that = this;
|
|
@@ -1875,7 +1875,8 @@ async sendEmailRedirectOnDesktop(to, token, project_id) {
|
|
|
1875
1875
|
let replacements = {
|
|
1876
1876
|
baseScope: baseScope,
|
|
1877
1877
|
token: token,
|
|
1878
|
-
project_id: project_id
|
|
1878
|
+
project_id: project_id,
|
|
1879
|
+
chatbot_id: chatbot_id
|
|
1879
1880
|
}
|
|
1880
1881
|
|
|
1881
1882
|
html = template(replacements);
|
|
@@ -162,10 +162,16 @@
|
|
|
162
162
|
<div style="margin-top: 20px; font-weight: 600;">Access Tiledesk on your desktop now 👇</div>
|
|
163
163
|
|
|
164
164
|
<div style="margin-top: 10px;">
|
|
165
|
-
|
|
165
|
+
<!-- // Change it with config parameter -->
|
|
166
|
+
<!-- <a href="{{baseScope.baseUrl}}/#/project/{{project_id}}/home?token={{token}}"
|
|
167
|
+
style=" background-color: #ff8574 !important; border: none; color: white; padding: 6px 18px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: 1px; margin: 4px 2px; cursor: pointer; border-radius: 8px;">
|
|
168
|
+
Enjoy Tiledesk
|
|
169
|
+
</a> -->
|
|
170
|
+
<a href="https://panel.tiledesk.com/v3/cds/#/project/{{project_id}}/chatbot/{{chatbot_id}}/intent/0?jwt={{token}}"
|
|
166
171
|
style=" background-color: #ff8574 !important; border: none; color: white; padding: 6px 18px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: 1px; margin: 4px 2px; cursor: pointer; border-radius: 8px;">
|
|
167
172
|
Enjoy Tiledesk
|
|
168
173
|
</a>
|
|
174
|
+
|
|
169
175
|
</div>
|
|
170
176
|
|
|
171
177
|
</div>
|
|
@@ -173,9 +179,13 @@
|
|
|
173
179
|
<div style="margin-top: 40px;">
|
|
174
180
|
Alternatively, simply copy and paste this URL into your browser:
|
|
175
181
|
<div>
|
|
176
|
-
<a
|
|
182
|
+
<!-- <a
|
|
177
183
|
href="{{baseScope.baseUrl}}/#/project/{{project_id}}/home?token={{token}}">
|
|
178
184
|
{{baseScope.baseUrl}}/#/project/{{project_id}}/home
|
|
185
|
+
</a> -->
|
|
186
|
+
<a
|
|
187
|
+
href="https://panel.tiledesk.com/v3/cds/#/project/{{project_id}}/chatbot/{{chatbot_id}}/intent/0?jwt={{token}}">
|
|
188
|
+
{{baseScope.baseUrl}}/#/project/{{project_id}}/home
|
|
179
189
|
</a>
|
|
180
190
|
</div>
|
|
181
191
|
</div>
|