Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Fixes #153 - Set default platform when using custom payload #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/v2-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class V2Agent {
consoleMessageList.forEach((consoleMessageJson) => {
const richMessageType = Object.keys(consoleMessageJson).find((key) => key !== 'platform');
if (richResponseMapping[richMessageType]) {
const messagePlatform = consoleMessageJson.platform ? consoleMessageJson.platform : undefined;
const messagePlatform = consoleMessageJson.platform ? consoleMessageJson.platform : PLATFORMS.UNSPECIFIED;
// convert the JSON to fufillment classes
let richResponse = richResponseMapping[richMessageType](consoleMessageJson, messagePlatform);
richResponse ? richConsoleMessages = richConsoleMessages.concat(richResponse) : null;
Expand Down