wingbot-daktela
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "wingbot-daktela", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Daktela connector for wingbot.ai", | ||
@@ -5,0 +5,0 @@ "main": "src/main.js", |
@@ -92,3 +92,4 @@ /* | ||
if (button) { | ||
const [action, data = {}] = JSON.parse(button.name); | ||
const buf = Buffer.from(button.name); | ||
const [action, data = {}] = JSON.parse(buf.toString('utf8')); | ||
req = Request.postBack( | ||
@@ -103,3 +104,4 @@ senderId, | ||
} else if (quickreply) { | ||
const [action, data = {}] = JSON.parse(quickreply.name); | ||
const buf = Buffer.from(quickreply.name); | ||
const [action, data = {}] = JSON.parse(buf.toString('utf8')); | ||
@@ -106,0 +108,0 @@ if (text) { |
@@ -48,3 +48,5 @@ /* | ||
return JSON.stringify([action, data]); | ||
const buf = Buffer.from(JSON.stringify([action, data])); | ||
return buf.toString('base64'); | ||
} | ||
@@ -152,3 +154,3 @@ | ||
async _send (payload) { | ||
const transformed = this._transformPayload(payload); | ||
let transformed = this._transformPayload(payload); | ||
@@ -159,3 +161,5 @@ if (!transformed) { | ||
Object.assign(transformed, { | ||
transformed = Object.assign({ | ||
quickreply: [] | ||
}, transformed, { | ||
conversation: { | ||
@@ -162,0 +166,0 @@ name: this._conversation.name |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33763
323