This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
libraries/bot-builder/src/main/java/com/microsoft/bot/builder Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -1096,6 +1096,7 @@ public CompletableFuture<Void> createConversation(
10961096 * @return A task that represents the work queued to execute.
10971097 */
10981098 @ SuppressWarnings ("checkstyle:InnerAssignment" )
1099+ @ Deprecated
10991100 public CompletableFuture <Void > createConversation (
11001101 String channelId ,
11011102 String serviceUrl ,
@@ -1112,13 +1113,21 @@ public CompletableFuture<Void> createConversation(
11121113 if (!StringUtils .isEmpty (tenantId )) {
11131114 // Putting tenantId in channelData is a temporary solution while we wait for the
11141115 // Teams API to be updated
1115- ObjectNode channelData = JsonNodeFactory .instance .objectNode ();
1116- channelData .set (
1117- "tenant" ,
1118- JsonNodeFactory .instance .objectNode ().set ("tenantId" , JsonNodeFactory .instance .textNode (tenantId ))
1119- );
1116+ if (conversationParameters .getChannelData () != null ) {
1117+ ((ObjectNode ) conversationParameters .getChannelData ()).set (
1118+ "tenantId" ,
1119+ JsonNodeFactory .instance .textNode (tenantId )
1120+ );
1121+ } else {
1122+ ObjectNode channelData = JsonNodeFactory .instance .objectNode ();
1123+ channelData .set (
1124+ "tenant" ,
1125+ JsonNodeFactory .instance .objectNode ()
1126+ .set ("tenantId" , JsonNodeFactory .instance .textNode (tenantId ))
1127+ );
11201128
1121- conversationParameters .setChannelData (channelData );
1129+ conversationParameters .setChannelData (channelData );
1130+ }
11221131
11231132 conversationParameters .setTenantId (tenantId );
11241133 }
You can’t perform that action at this time.
0 commit comments