Skip to content

Commit

Permalink
Updated samples with core changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevenic committed Apr 1, 2018
1 parent 1c73515 commit afeba5e
Show file tree
Hide file tree
Showing 74 changed files with 25,256 additions and 17,800 deletions.
37,413 changes: 23,923 additions & 13,490 deletions samples/alarmbot-es6-botframework-webchat/dist/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/alarmbot-es6-botframework-webchat/dist/app.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function begin(context) {

export function routeReply(context) {
// Handle users reply to prompt
const utterance = context.request.text.trim();
const utterance = context.activity.text.trim();
switch (context.state.conversation.prompt) {
case 'title':
// Validate reply and save to alarm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function begin(context) {
export function routeReply(context) {
// Validate users reply and delete alarm
let deleted = false;
const title = context.request.text.trim();
const title = context.activity.text.trim();
const list = context.state.user.alarms || [];
for (let i = 0; i < list.length; i++) {
if (list[i].title.toLowerCase() === title.toLowerCase()) {
Expand Down
4 changes: 2 additions & 2 deletions samples/alarmbot-es6-botframework-webchat/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import * as deleteAlarm from './alarms/deleteAlarm';
import * as cancel from './alarms/cancel';

export function routes(context) {
if (context.request.type === 'message') {
if (context.activity.type === 'message') {
// Check for the triggering of a new topic
const utterance = (context.request.text || '').trim().toLowerCase();
const utterance = (context.activity.text || '').trim().toLowerCase();
if (utterance.includes('add alarm')) {
return addAlarm.begin(context);
} else if (utterance.includes('delete alarm')) {
Expand Down
Loading

0 comments on commit afeba5e

Please sign in to comment.