diff --git a/libraries/bot-builder/src/main/java/com/microsoft/bot/builder/BotAdapter.java b/libraries/bot-builder/src/main/java/com/microsoft/bot/builder/BotAdapter.java index c9d2f64f7..ecd5690a2 100644 --- a/libraries/bot-builder/src/main/java/com/microsoft/bot/builder/BotAdapter.java +++ b/libraries/bot-builder/src/main/java/com/microsoft/bot/builder/BotAdapter.java @@ -269,9 +269,7 @@ public CompletableFuture continueConversation( ConversationReference reference, BotCallbackHandler callback ) { - CompletableFuture result = new CompletableFuture<>(); - result.completeExceptionally(new NotImplementedException("continueConversation")); - return result; + return Async.completeExceptionally(new NotImplementedException("continueConversation")); } /** @@ -296,8 +294,80 @@ public CompletableFuture continueConversation( String audience, BotCallbackHandler callback ) { - CompletableFuture result = new CompletableFuture<>(); - result.completeExceptionally(new NotImplementedException("continueConversation")); - return result; + return Async.completeExceptionally(new NotImplementedException("continueConversation")); + } + + /** + * 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 botId The application ID of the bot. This parameter is ignored in single tenant + * the Adapters (Console, Test, etc) but is critical to the BotFrameworkAdapter + * which is multi-tenant aware. + * @param continuationActivity An Activity with the appropriate ConversationReference with + * which to continue the conversation. + * @param callback The method to call for the result bot turn. + * @return A task that represents the work queued to execute. + */ + public CompletableFuture continueConversation( + String botId, + Activity continuationActivity, + BotCallbackHandler callback + ) { + return Async.completeExceptionally(new NotImplementedException("continueConversation")); + } + + /** + * 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 claimsIdentity A ClaimsIdentity for the conversation. + * @param continuationActivity An Activity with the appropriate ConversationReference with + * which to continue the conversation. + * @param callback The method to call for the result bot turn. + * @return A task that represents the work queued to execute. + */ + public CompletableFuture continueConversation( + ClaimsIdentity claimsIdentity, + Activity continuationActivity, + BotCallbackHandler callback + ) { + return Async.completeExceptionally(new NotImplementedException("continueConversation")); + } + + /** + * 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 claimsIdentity A ClaimsIdentity for the conversation. + * @param continuationActivity An Activity with the appropriate ConversationReference with + * which to continue the conversation. + * @param audience A value signifying the recipient of the proactive + * message. + * @param callback The method to call for the result bot turn. + * @return A task that represents the work queued to execute. + */ + public CompletableFuture continueConversation( + ClaimsIdentity claimsIdentity, + Activity continuationActivity, + String audience, + BotCallbackHandler callback + ) { + return Async.completeExceptionally(new NotImplementedException("continueConversation")); } }