@@ -138,24 +138,31 @@ async def continue_conversation(
138
138
Sends a proactive message to a conversation. Call this method to proactively send a message to a conversation.
139
139
Most _channels require a user to initiate a conversation with a bot before the bot can send activities
140
140
to the user.
141
- :param bot_id: The application ID of the bot. This parameter is ignored in
142
- single tenant the Adpters (Console, Test, etc) but is critical to the BotFrameworkAdapter
143
- which is multi-tenant aware. </param>
144
- :param reference: A reference to the conversation to continue.</param>
145
- :param callback: The method to call for the resulting bot turn.</param>
146
- :param claims_identity:
141
+ :param bot_id: Unused for this override.
142
+ :param reference: A reference to the conversation to continue.
143
+ :param callback: The method to call for the resulting bot turn.
144
+ :param claims_identity: A ClaimsIdentity for the conversation.
145
+ :param audience: Unused for this override.
147
146
"""
148
147
149
148
if not reference :
150
149
raise Exception ("ConversationReference is required" )
151
150
if not callback :
152
151
raise Exception ("callback is required" )
153
152
154
- request = TurnContext .apply_conversation_reference (
155
- conversation_reference_extension .get_continuation_activity (reference ),
156
- reference ,
157
- )
158
- context = TurnContext (self , request )
153
+ if claims_identity :
154
+ request = conversation_reference_extension .get_continuation_activity (
155
+ reference
156
+ )
157
+ context = TurnContext (self , request )
158
+ context .turn_state [BotAdapter .BOT_IDENTITY_KEY ] = claims_identity
159
+ context .turn_state [BotAdapter .BOT_CALLBACK_HANDLER_KEY ] = callback
160
+ else :
161
+ request = TurnContext .apply_conversation_reference (
162
+ conversation_reference_extension .get_continuation_activity (reference ),
163
+ reference ,
164
+ )
165
+ context = TurnContext (self , request )
159
166
160
167
return await self .run_pipeline (context , callback )
161
168
0 commit comments