Commit e7222322 authored by Eric Meier's avatar Eric Meier

fixes ... :)

parent d0a57dca
......@@ -58,15 +58,32 @@ module.exports = [
session.dialogData.duration =
session.dialogData.duration || args.response;
session.send(
answers.formatedRandomAnswer("learn.fetching", [
session.userData.name
])
);
next();
},
function(session, args, next) {
const suggestions = client.querySuggestions(
session.dialogData.topic,
session.dialogData.duration,
session.dialogData.skillLevel
);
//suggestionStore.addHistory(suggestions);
suggestionStore.addHistory(suggestions, session.userData);
session.send(
answers.formatedRandomAnswer("learn.fetched", [
session.userData.name
])
);
session.replaceDialog("suggestions", suggestions);
next();
session.endDialog();
}
];
......
......@@ -10,10 +10,11 @@ module.exports = [
choices.push(JSON.stringify(element));
});
builder.Prompts.choice(session, msg, choices);
},
(session, results, next) => {
session.replaceDialog("vote", JSON.parse(results.response.entity));
session.endDialog();
}
//(session, results, next) => {
// session.replaceDialog("vote", JSON.parse(results.response.entity));
//}
];
const suggCards = (session, args) => {
......
......@@ -25,7 +25,9 @@
"How much time to you have to spear?",
"How much spare time do you have?",
"How much time can you invest [0]?"
]
],
"fetching": ["Ok. I'm looking for the best links for you"],
"fetched": ["This is what I found for you"]
},
"name": {
"question": [
......
......@@ -19,7 +19,8 @@ var getRecentQueries = (count, userData) => {
};
var addHistory = (suggestions, userData) => {
userData = userData.concat(suggestions).slice(0, 150);
if (!userData.recentQueries) userData.recentQueries = [];
userData = userData.recentQueries.concat(suggestions).slice(0, 150);
};
var getSuggestionByUrl = (url, userData) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment