-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from CatalystCode/proxy-mode
Proxy mode
- Loading branch information
Showing
38 changed files
with
1,607 additions
and
14,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
|
||
module.exports = function (session, next, data) { | ||
module.exports = (session, next, data) => { | ||
|
||
var intent = session.privateConversationData[data.source]; | ||
var intent = session.dialogData.data[data.source]; | ||
var alarmTime = null; | ||
if (intent.actions[0].parameters[0].name == "time") { | ||
// alarmTime = intent.entities... | ||
// use intent.entities to extract relevant information | ||
// assuming extracted alarmTime | ||
alarmTime = '2016-10-10 10:10'; | ||
// use intent.entities to extract relevant information | ||
// assuming extracted alarmTime | ||
|
||
alarmTime = '2016-10-10 10:10'; | ||
} | ||
|
||
if (data.target && alarmTime) { | ||
session.dialogData.data[data.target] = alarmTime; | ||
} | ||
|
||
session.send('Alarm set for ' + alarmTime); | ||
next(); | ||
return next(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
module.exports = function (session, next) { | ||
module.exports = (session, next) => { | ||
var summary = "Summary: "; | ||
for (var prop in session.dialogData.data) { | ||
summary += prop + ': [' + session.dialogData.data[prop] + ']; '; | ||
} | ||
session.send(summary); | ||
next(); | ||
return next(); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.