Jaa


ActivityHandler.OnReactionsAddedAsync Method

Definition

Override this in a derived class to provide logic for when reactions to a previous activity are added to the conversation.

protected virtual System.Threading.Tasks.Task OnReactionsAddedAsync (System.Collections.Generic.IList<Microsoft.Bot.Schema.MessageReaction> messageReactions, Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IMessageReactionActivity> turnContext, System.Threading.CancellationToken cancellationToken);
abstract member OnReactionsAddedAsync : System.Collections.Generic.IList<Microsoft.Bot.Schema.MessageReaction> * Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IMessageReactionActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnReactionsAddedAsync : System.Collections.Generic.IList<Microsoft.Bot.Schema.MessageReaction> * Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IMessageReactionActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnReactionsAddedAsync (messageReactions As IList(Of MessageReaction), turnContext As ITurnContext(Of IMessageReactionActivity), cancellationToken As CancellationToken) As Task

Parameters

messageReactions
IList<MessageReaction>

The list of reactions added.

turnContext
ITurnContext<IMessageReactionActivity>

A strongly-typed context object for this turn.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

Message reactions correspond to the user adding a 'like' or 'sad' etc. (often an emoji) to a previously sent message on the conversation. Message reactions are supported by only a few channels. The activity that the message is in reaction to is identified by the activity's ReplyToId property. The value of this property is the activity ID of a previously sent activity. When the bot sends an activity, the channel assigns an ID to it, which is available in the Id of the result.

Applies to

See also