Share via


IActivity.ApplyConversationReference(ConversationReference, Boolean) Method

Definition

Updates an activity with the delivery information from an existing conversation reference.

public Microsoft.Bot.Schema.Activity ApplyConversationReference (Microsoft.Bot.Schema.ConversationReference reference, bool isIncoming = false);
abstract member ApplyConversationReference : Microsoft.Bot.Schema.ConversationReference * bool -> Microsoft.Bot.Schema.Activity
Public Function ApplyConversationReference (reference As ConversationReference, Optional isIncoming As Boolean = false) As Activity

Parameters

reference
ConversationReference

The conversation reference.

isIncoming
Boolean

(Optional) true to treat the activity as an incoming activity, where the bot is the recipient; otherwaire false. Default is false, and the activity will show the bot as the sender.

Returns

Activity.

Exceptions

reference is null.

Remarks

Call GetConversationReference() on an incoming activity to get a conversation reference that you can then use to update an outgoing activity with the correct delivery information.

Applies to