@tiledesk/tiledesk-tybot-connector 0.2.153-rc5 → 0.2.153-rc7
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 +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ router.post('/ext/:botid', async (req, res) => {
|
|
|
67
67
|
/** MANAGE AUDIO FILE MESSAGE */
|
|
68
68
|
let aiService = new AiService({
|
|
69
69
|
API_ENDPOINT: API_ENDPOINT,
|
|
70
|
-
|
|
70
|
+
TOKEN: token,
|
|
71
71
|
PROJECT_ID: projectId
|
|
72
72
|
})
|
|
73
73
|
let isAudio = TiledeskChatbotUtil.isAudioMessage(message)
|
|
@@ -75,7 +75,7 @@ router.post('/ext/:botid', async (req, res) => {
|
|
|
75
75
|
console.log('(chatbot index) is audio', message.metadata)
|
|
76
76
|
message.text = await aiService.speechToText(message.metadata.src).catch(err => {
|
|
77
77
|
console.log('errrr', err)
|
|
78
|
-
res.status(400).send({"success": false, error: "Unable to translate audio message for request: " + requestId})
|
|
78
|
+
return res.status(400).send({"success": false, error: "Unable to translate audio message for request: " + requestId})
|
|
79
79
|
})
|
|
80
80
|
}
|
|
81
81
|
|