Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions libraries/Microsoft.Bot.Builder/Integration/IAdapterIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,26 @@ Task<InvokeResponse> ProcessActivityAsync(
Activity activity,
BotCallbackHandler callback,
CancellationToken cancellationToken);

/// <summary>
/// Sends a proactive message to a conversation.
/// </summary>
/// <param name="botId">The application ID of the bot. This paramter is ignored in
/// single tenant the Adpters (Console, Test, etc) but is critical to the BotFrameworkAdapter
/// which is multi-tenant aware. </param>
/// <param name="reference">A reference to the conversation to continue.</param>
/// <param name="callback">The method to call for the resulting bot turn.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <remarks>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.</remarks>
/// <seealso cref="BotAdapter.ContinueConversationAsync(string, ConversationReference, BotCallbackHandler, CancellationToken)"/>
Task ContinueConversationAsync(
string botId,
ConversationReference reference,
BotCallbackHandler callback,
CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public InteceptorAdapter(IAdapterIntegration innerAdapter)
_innerAdapter = innerAdapter;
}

public Task ContinueConversationAsync(string botId, ConversationReference reference, BotCallbackHandler callback, CancellationToken cancellationToken = default(CancellationToken))
{
return _innerAdapter.ContinueConversationAsync(botId, reference, callback, cancellationToken);
}

public Task<InvokeResponse> ProcessActivityAsync(string authHeader, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken)
{
return _innerAdapter.ProcessActivityAsync(authHeader, activity, callback, cancellationToken);
Expand Down
7 changes: 7 additions & 0 deletions tests/Microsoft.Bot.Builder.TestBot/InteceptorAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ public InteceptorAdapter(IAdapterIntegration innerAdapter)
_innerAdapter = innerAdapter;
}

public Task ContinueConversationAsync(string botId, ConversationReference reference, BotCallbackHandler callback, CancellationToken cancellationToken = default(CancellationToken))
{
return _innerAdapter.ContinueConversationAsync(botId, reference, callback, cancellationToken);
}

public Task<InvokeResponse> ProcessActivityAsync(string authHeader, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken)
{
return _innerAdapter.ProcessActivityAsync(authHeader, activity, callback, cancellationToken);
}


}
}