File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
libraries/botbuilder-dialogs Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1616 DialogStateManager ,
1717 DialogStateManagerConfiguration ,
1818)
19- from botbuilder .schema import Activity , ActivityTypes
19+ from botbuilder .schema import Activity , ActivityTypes , EndOfConversationCodes
2020from botframework .connector .auth import (
2121 AuthenticationConstants ,
2222 ClaimsIdentity ,
@@ -355,6 +355,9 @@ async def handle_skill_on_turn(
355355 type = ActivityTypes .end_of_conversation ,
356356 value = turn_result .result ,
357357 locale = turn_context .activity .locale ,
358+ code = EndOfConversationCodes .completed_successfully
359+ if turn_result .status == DialogTurnStatus .Complete
360+ else EndOfConversationCodes .user_cancelled ,
358361 )
359362 await turn_context .send_activity (activity )
360363
Original file line number Diff line number Diff line change 3838 ActivityTypes ,
3939 ChannelAccount ,
4040 ConversationAccount ,
41+ EndOfConversationCodes ,
4142 InputHints ,
4243)
4344from botframework .connector .auth import AuthenticationConstants , ClaimsIdentity
@@ -237,6 +238,10 @@ async def test_handles_bot_and_skills(self):
237238 SimpleComponentDialog .eoc_sent .type ,
238239 ActivityTypes .end_of_conversation ,
239240 )
241+ self .assertEqual (
242+ SimpleComponentDialog .eoc_sent .code ,
243+ EndOfConversationCodes .completed_successfully ,
244+ )
240245 self .assertEqual (SimpleComponentDialog .eoc_sent .value , "SomeName" )
241246 else :
242247 self .assertIsNone (
You can’t perform that action at this time.
0 commit comments