From 4fa3f69069b09e40257ab8bcb8537e99b3380ca0 Mon Sep 17 00:00:00 2001 From: CeciliaAvila Date: Wed, 3 May 2023 12:04:22 -0300 Subject: [PATCH] Add call to save state in Set Property actions --- .../botbuilder-dialogs-adaptive/src/actions/setProperties.ts | 3 +++ .../botbuilder-dialogs-adaptive/src/actions/setProperty.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libraries/botbuilder-dialogs-adaptive/src/actions/setProperties.ts b/libraries/botbuilder-dialogs-adaptive/src/actions/setProperties.ts index 1337f196ea..08caf92cf1 100644 --- a/libraries/botbuilder-dialogs-adaptive/src/actions/setProperties.ts +++ b/libraries/botbuilder-dialogs-adaptive/src/actions/setProperties.ts @@ -109,6 +109,9 @@ export class SetProperties extends Dialog implements S dc.state.setValue(property, value); } + // save all state scopes to their respective botState locations. + await dc.state.saveAllChanges(); + return await dc.endDialog(); } diff --git a/libraries/botbuilder-dialogs-adaptive/src/actions/setProperty.ts b/libraries/botbuilder-dialogs-adaptive/src/actions/setProperty.ts index 23c148275d..fff53e7902 100644 --- a/libraries/botbuilder-dialogs-adaptive/src/actions/setProperty.ts +++ b/libraries/botbuilder-dialogs-adaptive/src/actions/setProperty.ts @@ -120,6 +120,9 @@ export class SetProperty extends Dialog implements Set dc.state.setValue(property, value); + // save all state scopes to their respective botState locations. + await dc.state.saveAllChanges(); + return await dc.endDialog(); }