Skip to content

Commit

Permalink
ContosoFlowers fix for retrieving saved addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
pcostantini committed Feb 25, 2017
1 parent 69befe5 commit cebf1e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Node/demo-ContosoFlowers/bot/dialogs/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ lib.dialog('billing', [

var message = new builder.Message(session)
.attachmentLayout(builder.AttachmentLayout.carousel);
var homeAddress = saved[UseSavedInfoChoices.Home];
var workAddress = saved[UseSavedInfoChoices.Work];
var homeAddress = saved[session.gettext(UseSavedInfoChoices.Home)];
var workAddress = saved[session.gettext(UseSavedInfoChoices.Work)];
if (homeAddress) message.addAttachment(createAddressCard(session, session.gettext(UseSavedInfoChoices.Home), homeAddress));
if (workAddress) message.addAttachment(createAddressCard(session, session.gettext(UseSavedInfoChoices.Work), workAddress));
message.addAttachment(createAddressCard(session, session.gettext(UseSavedInfoChoices.NotThisTime), 'add_new_address'));
Expand Down
4 changes: 2 additions & 2 deletions Node/demo-ContosoFlowers/bot/dialogs/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ lib.dialog('addresses', [
var saved = session.userData.billingAddresses = session.userData.billingAddresses || {};
var message = new builder.Message(session)
.attachmentLayout(builder.AttachmentLayout.carousel);
var homeAddress = saved[UseSavedInfoChoices.Home];
var workAddress = saved[UseSavedInfoChoices.Work];
var homeAddress = saved[session.gettext(UseSavedInfoChoices.Home)];
var workAddress = saved[session.gettext(UseSavedInfoChoices.Work)];
var notSet = session.gettext('not_set');
message.addAttachment(createAddressCard(session, session.gettext(UseSavedInfoChoices.Home), homeAddress || notSet));
message.addAttachment(createAddressCard(session, session.gettext(UseSavedInfoChoices.Work), workAddress || notSet));
Expand Down

0 comments on commit cebf1e5

Please sign in to comment.