Skip to content

Commit 557462f

Browse files
Fixed issue with channel_data being overwritten in create_conversation (microsoft#1749)
Co-authored-by: Axel Suárez <axsuarez@microsoft.com>
1 parent 3a91f0f commit 557462f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libraries/botbuilder-core/botbuilder/core/bot_framework_adapter.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ async def create_conversation(
340340
If the conversation is established with the specified users, the ID of the activity
341341
will contain the ID of the new conversation.
342342
"""
343+
343344
try:
344345
if not service_url:
345346
service_url = reference.service_url
@@ -366,8 +367,10 @@ async def create_conversation(
366367
# Mix in the tenant ID if specified. This is required for MS Teams.
367368
if reference.conversation and reference.conversation.tenant_id:
368369
# Putting tenant_id in channel_data is a temporary while we wait for the Teams API to be updated
369-
parameters.channel_data = {
370-
"tenant": {"tenantId": reference.conversation.tenant_id}
370+
if parameters.channel_data is None:
371+
parameters.channel_data = {}
372+
parameters.channel_data["tenant"] = {
373+
"tenantId": reference.conversation.tenant_id
371374
}
372375

373376
# Permanent solution is to put tenant_id in parameters.tenant_id

0 commit comments

Comments
 (0)