This repository was archived by the owner on Jun 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
solutions/Virtual-Assistant/src/csharp/skills/calendarskill/Dialogs Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,8 @@ public MainDialog(
275275
276276 private async Task < InterruptionAction > OnCancel ( DialogContext dc )
277277 {
278+ var state = await _stateAccessor . GetAsync ( dc . Context , ( ) => new CalendarSkillState ( ) ) ;
279+ state . Clear ( ) ;
278280 await dc . Context . SendActivityAsync ( dc . Context . Activity . CreateReply ( CalendarMainResponses . CancelMessage ) ) ;
279281 await CompleteAsync ( dc ) ;
280282 await dc . CancelAllDialogsAsync ( ) ;
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ public SummaryDialog(
155155 // this will lead to error when test
156156 if ( string . IsNullOrEmpty ( state . APIToken ) )
157157 {
158+ state . Clear ( ) ;
158159 return await sc . EndDialogAsync ( true ) ;
159160 }
160161
@@ -185,6 +186,7 @@ public SummaryDialog(
185186 if ( searchedEvents . Count == 0 )
186187 {
187188 await sc . Context . SendActivityAsync ( sc . Context . Activity . CreateReply ( SummaryResponses . ShowNoMeetingMessage ) ) ;
189+ state . Clear ( ) ;
188190 return await sc . EndDialogAsync ( true ) ;
189191 }
190192 else
@@ -333,6 +335,7 @@ public SummaryDialog(
333335 var topIntent = luisResult ? . TopIntent ( ) . intent ;
334336 if ( topIntent == null )
335337 {
338+ state . Clear ( ) ;
336339 return await sc . EndDialogAsync ( true ) ;
337340 }
338341
@@ -360,6 +363,7 @@ public SummaryDialog(
360363 }
361364 else
362365 {
366+ state . Clear ( ) ;
363367 return await sc . EndDialogAsync ( true ) ;
364368 }
365369 }
You can’t perform that action at this time.
0 commit comments