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 16
16
DialogStateManager ,
17
17
DialogStateManagerConfiguration ,
18
18
)
19
- from botbuilder .schema import Activity , ActivityTypes
19
+ from botbuilder .schema import Activity , ActivityTypes , EndOfConversationCodes
20
20
from botframework .connector .auth import (
21
21
AuthenticationConstants ,
22
22
ClaimsIdentity ,
@@ -355,6 +355,9 @@ async def handle_skill_on_turn(
355
355
type = ActivityTypes .end_of_conversation ,
356
356
value = turn_result .result ,
357
357
locale = turn_context .activity .locale ,
358
+ code = EndOfConversationCodes .completed_successfully
359
+ if turn_result .status == DialogTurnStatus .Complete
360
+ else EndOfConversationCodes .user_cancelled ,
358
361
)
359
362
await turn_context .send_activity (activity )
360
363
Original file line number Diff line number Diff line change 38
38
ActivityTypes ,
39
39
ChannelAccount ,
40
40
ConversationAccount ,
41
+ EndOfConversationCodes ,
41
42
InputHints ,
42
43
)
43
44
from botframework .connector .auth import AuthenticationConstants , ClaimsIdentity
@@ -237,6 +238,10 @@ async def test_handles_bot_and_skills(self):
237
238
SimpleComponentDialog .eoc_sent .type ,
238
239
ActivityTypes .end_of_conversation ,
239
240
)
241
+ self .assertEqual (
242
+ SimpleComponentDialog .eoc_sent .code ,
243
+ EndOfConversationCodes .completed_successfully ,
244
+ )
240
245
self .assertEqual (SimpleComponentDialog .eoc_sent .value , "SomeName" )
241
246
else :
242
247
self .assertIsNone (
You can’t perform that action at this time.
0 commit comments