Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,31 @@ async def continue_conversation(
Sends a proactive message to a conversation. Call this method to proactively send a message to a conversation.
Most _channels require a user to initiate a conversation with a bot before the bot can send activities
to the user.
:param bot_id: The application ID of the bot. This parameter is ignored in
single tenant the Adpters (Console, Test, etc) but is critical to the BotFrameworkAdapter
which is multi-tenant aware. </param>
:param reference: A reference to the conversation to continue.</param>
:param callback: The method to call for the resulting bot turn.</param>
:param claims_identity:
:param bot_id: Unused for this override.
:param reference: A reference to the conversation to continue.
:param callback: The method to call for the resulting bot turn.
:param claims_identity: A ClaimsIdentity for the conversation.
:param audience: Unused for this override.
"""

if not reference:
raise Exception("ConversationReference is required")
if not callback:
raise Exception("callback is required")

request = TurnContext.apply_conversation_reference(
conversation_reference_extension.get_continuation_activity(reference),
reference,
)
context = TurnContext(self, request)
if claims_identity:
request = conversation_reference_extension.get_continuation_activity(
reference
)
context = TurnContext(self, request)
context.turn_state[BotAdapter.BOT_IDENTITY_KEY] = claims_identity
context.turn_state[BotAdapter.BOT_CALLBACK_HANDLER_KEY] = callback
else:
request = TurnContext.apply_conversation_reference(
conversation_reference_extension.get_continuation_activity(reference),
reference,
)
context = TurnContext(self, request)

return await self.run_pipeline(context, callback)

Expand Down