@botique/bmp
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -35,7 +35,7 @@ import { ObjectID } from "mongodb"; | ||
title: string; | ||
url: string; | ||
url: any; | ||
} | { | ||
type: any; | ||
title: string; | ||
data: string; | ||
data: any; | ||
}; |
@@ -39,3 +39,3 @@ "use strict"; | ||
try { | ||
const activityJSON = JSON.parse(directlineActivity.text || "{}"); | ||
const activityJSON = directlineActivity.value || JSON.parse(directlineActivity.text || "{}"); | ||
if (!lodash_1.isEmpty(activityJSON.payload)) { | ||
@@ -112,3 +112,7 @@ // If we have a valid json with a payload attribute, we assume a payload message was sent | ||
contentType: UserMessage_1.ContentType.Payload, | ||
content: { payload: JSON.parse(directlineActivity.text).payload } | ||
content: { | ||
payload: directlineActivity.value ? | ||
JSON.stringify(Object.assign({}, JSON.parse(directlineActivity.value.payload), { title: directlineActivity.value.title })) : | ||
JSON.parse(directlineActivity.text).payload | ||
} | ||
}; | ||
@@ -347,3 +351,3 @@ } | ||
else if (cardActionType === "Action.Submit") { | ||
value = JSON.stringify({ payload: button.payload }); | ||
value = { payload: button.payload, title: button.title }; | ||
return { | ||
@@ -350,0 +354,0 @@ type: cardActionType, |
{ | ||
"name": "@botique/bmp", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Botique Messaging Protocol", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
59951
55
780
1