Share via


IMessageActivity Interface

Definition

A message in a conversation.

public interface IMessageActivity : Microsoft.Bot.Schema.IActivity
type IMessageActivity = interface
    interface IActivity
Public Interface IMessageActivity
Implements IActivity
Derived
Implements

Properties

AttachmentLayout

Gets or sets hint for how to deal with multiple attachments: [list|carousel] Default:list.

Attachments

Gets or sets attachments.

ChannelData

Gets or sets channel-specific payload.

(Inherited from IActivity)
ChannelId

Gets or sets Channel this activity is associated with.

(Inherited from IActivity)
Conversation

Gets or sets Address for the conversation that this activity is associated with.

(Inherited from IActivity)
DeliveryMode

Gets or sets hint to describe how this activity should be delivered. null or "default" = default delivery "notification" = notification semantics See DeliveryModes for current constants.

Entities

Gets or sets collection of Entity objects, each of which contains metadata about this activity. Each Entity object is typed.

(Inherited from IActivity)
Expiration

Gets or sets dateTime to expire the activity as ISO 8601 encoded datetime.

From

Gets or sets Sender address.

(Inherited from IActivity)
Id

Gets or sets iD for the activity.

(Inherited from IActivity)
Importance

Gets or sets importance of the activity Valid values are "low", "normal", and "high". Default value is "normal.".

InputHint

Gets or sets indicates whether the bot is accepting, expecting, or ignoring input.

Locale

Gets or sets the language code of the Text field.

LocalTimestamp

Gets or sets the local date and time of the message, expressed in ISO-8601 format. For example, 2016-09-23T13:07:49.4714686-07:00.

(Inherited from IActivity)
Recipient

Gets or sets address that received the message.

(Inherited from IActivity)
ReplyToId

Gets or sets the original ID this activity is a response to.

(Inherited from IActivity)
ServiceUrl

Gets or sets service URL where responses to this activity should be sent.

(Inherited from IActivity)
Speak

Gets or sets speak tag (SSML markup for text to speech).

SuggestedActions

Gets or sets suggestedActions are used to express actions for interacting with a card like keyboards/quickReplies.

Summary

Gets or sets text to display if the channel cannot render cards.

Text

Gets or sets content for the message.

TextFormat

Gets or sets format of text fields [plain|markdown] Default:markdown.

Timestamp

Gets or sets timestamp when this message was sent (UTC).

(Inherited from IActivity)
Type

Gets or sets activity type.

(Inherited from IActivity)
Value

Gets or sets value provided with CardAction.

Methods

ApplyConversationReference(ConversationReference, Boolean)

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

(Inherited from IActivity)
AsContactRelationUpdateActivity()

Return IContactRelationUpdateActivity if this is a contactRelationUpdate activity, null otherwise.

(Inherited from IActivity)
AsConversationUpdateActivity()

Return IConversationUpdateActivity if this is a conversationUpdate activity, null otherwise.

(Inherited from IActivity)
AsEndOfConversationActivity()

Return IEndOfConversationActivity if this is an end-of-conversation activity, null otherwise.

(Inherited from IActivity)
AsEventActivity()

Returns IEventActivity if this is an event activity, null otherwise.

(Inherited from IActivity)
AsInstallationUpdateActivity()

Return IInstallationUpdateActivity if this is a installationUpdate activity, null otherwise.

(Inherited from IActivity)
AsInvokeActivity()

Returns IInvokeActivity if this is an invoke activity, null otherwise.

(Inherited from IActivity)
AsMessageActivity()

Return IMessageActivity if this is a message activity, null otherwise.

(Inherited from IActivity)
AsMessageDeleteActivity()

Returns IMessageDeleteActivity if this is a message delete activity, null otherwise.

(Inherited from IActivity)
AsMessageReactionActivity()

Returns IMessageDeleteActivity if this is a message reaction activity, null otherwise.

(Inherited from IActivity)
AsMessageUpdateActivity()

Returns IMessageUpdateActivity if this is a message update activity, null otherwise.

(Inherited from IActivity)
AsSuggestionActivity()

Returns IMessageDeleteActivity if this is a suggestion activity, null otherwise.

(Inherited from IActivity)
AsTypingActivity()

Return ITypingActivity if this is a typing activity, null otherwise.

(Inherited from IActivity)
GetChannelData<TypeT>()

Gets the channel data as strongly typed object.

(Inherited from IActivity)
GetConversationReference()

Gets a conversation reference from an activity.

(Inherited from IActivity)
GetMentions()

Get mentions.

HasContent()

True if this activity has text, attachments, or channelData.

TryGetChannelData<TypeT>(TypeT)

Try to get the channeldata as a strongly typed object.

(Inherited from IActivity)

Extension Methods

TeamsGetChannelId(IActivity)

Gets the Team's channel id from the current activity.

TeamsGetMeetingInfo(IActivity)

Gets the TeamsMeetingInfo object from the current activity.

TeamsGetSelectedChannelId(IActivity)

Gets the Team's selected channel id from the current activity.

TeamsGetTeamInfo(IActivity)

Gets the TeamsInfo object from the current activity.

TeamsGetTeamOnBehalfOf(IActivity)

Gets the Teams OnBehalfOf list from the current activity.

TeamsNotifyUser(IActivity, Boolean, String)

Configures the current activity to generate a notification within Teams.

TeamsNotifyUser(IActivity)

Configures the current activity to generate a notification within Teams.

MentionsId(IMessageActivity, String)

Is there a mention of Id in the Text Property.

MentionsRecipient(IMessageActivity)

Is there a mention of Recipient.Id in the Text Property.

RemoveMentionText(IMessageActivity, String)

Remove any mention text for given id from the Activity.Text property. For example, given the message @echoBot Hi Bot, this will remove "@echoBot", leaving "Hi Bot".

RemoveRecipientMention(IMessageActivity)

Remove recipient mention text from Text property. Use with caution because this function is altering the text on the Activity.

GetLocale(IActivity)

Gets the locale for the activity.

SetLocale(IActivity, String)

Sets the locale for the activity.

Applies to