Language

MessageUpdateActivity Class

Definition

Represents a message update activity.

public class MessageUpdateActivity : Microsoft.Teams.Apps.MessageActivity
type MessageUpdateActivity = class
    inherit MessageActivity
Public Class MessageUpdateActivity
Inherits MessageActivity
Inheritance

Properties

Name Description
AttachmentLayout

Gets the attachment layout.

(Inherited from MessageActivity)
Attachments

Gets the attachments for the message.

(Inherited from MessageActivity)
ChannelData

Gets the Teams-specific channel data associated with this activity.

(Inherited from TeamsActivity)
ChannelId

Gets or sets the unique identifier for the channel on which this activity is occurring.

(Inherited from CoreActivity)
Conversation

Gets or sets the conversation information for the Teams conversation. Delegates to the base CoreActivity.Conversation slot, casting to TeamsConversation.

(Inherited from TeamsActivity)
Entities

Gets the entities specific to Teams.

(Inherited from TeamsActivity)
From

Gets or sets the account information for the sender of the Teams conversation. Delegates to the base CoreActivity.From slot, casting to TeamsChannelAccount.

(Inherited from TeamsActivity)
Id

Gets or sets the unique identifier for the activity.

(Inherited from CoreActivity)
Locale

Locale of the activity set by the client (e.g., "en-US").

(Inherited from TeamsActivity)
LocalTimestamp

Local timestamp of when the activity was sent, including timezone offset.

(Inherited from TeamsActivity)
LocalTimezone

Local timezone of the client (e.g., "America/Los_Angeles").

(Inherited from TeamsActivity)
Properties

Gets the extension data dictionary for storing additional properties not defined in the schema.

(Inherited from CoreActivity)
Recipient

Gets or sets the account information for the recipient of the Teams conversation. Delegates to the base CoreActivity.Recipient slot, casting to TeamsChannelAccount.

(Inherited from TeamsActivity)
ReplyToId

Gets or sets the identifier of the activity this activity is a reply to.

(Inherited from CoreActivity)
ServiceUrl

Gets or sets the URL of the service endpoint for this activity.

(Inherited from CoreActivity)
SuggestedActions

Gets the suggested actions for the message.

(Inherited from TeamsActivity)
TenantId

The tenant an activity belongs to, read from the conversation first and from channel data second.

Reading only conversation.tenantId silently misses the ones that arrive as channelData.tenant depending on the activity. An empty tenant is treated as absent.

(Inherited from TeamsActivity)
Text

Gets the text content of the message.

(Inherited from MessageActivity)
TextFormat

Gets the text format. See TextFormats for common values (plain, markdown, xml, extendedmarkdown).

(Inherited from MessageActivity)
TextWithoutMentions

Gets the message text with the bot (recipient) @mention removed and trimmed. In group chats, Teams prepends "<at>botname</at>" to the text when the bot is mentioned. This property strips that mention so handlers can match on the user's intent alone.

(Inherited from MessageActivity)
Timestamp

UTC timestamp of when the activity was sent.

(Inherited from TeamsActivity)
Type

Gets or sets the type of the activity. See ActivityType for common values.

(Inherited from CoreActivity)

Methods

Name Description
FromActivity(CoreActivity)

Convenience method to create a MessageUpdateActivity from a CoreActivity.

ToJson()

Overrides the ToJson method to serialize the TeamsActivity object to a JSON string. Uses the appropriate JSON type info based on the actual runtime type.

(Inherited from TeamsActivity)
ToJson<T>(JsonTypeInfo<T>)

Serializes the current activity to a JSON string using the specified JsonTypeInfo<T> for source-generated serialization.

(Inherited from CoreActivity)

Extension Methods

Name Description
AddAIGenerated(MessageActivity)
Obsolete.

Adds the AI-generated content label to the root message entity.

AddAttachment(MessageActivity, TeamsAttachment[])
Obsolete.

Adds one or more attachments to the message.

AddCitation(MessageActivity, Int32, CitationAppearance)
Obsolete.

Adds a citation claim to the message.

AddEntity(MessageActivity, Entity[])
Obsolete.

Adds one or more entities to the message.

AddFeedback(MessageActivity, Boolean)
Obsolete.

Enables/disables feedback loop on the message.

AddFeedback(MessageActivity, String)
Obsolete.

Configures feedback loop mode on the message.

AddMention(MessageActivity, ChannelAccount, String, Boolean)
Obsolete.

Adds a mention (@mention) entity and optionally prepends mention text.

AddQuote(MessageActivity, String, String)
Obsolete.

Adds a quoted message reference and appends a placeholder to the message text.

AddSensitivityLabel(MessageActivity, String, String, DefinedTerm)
Obsolete.

Adds a content sensitivity label to the message.

AddStreamFinal(MessageActivity)
Obsolete.

Marks the message as a final streaming message by adding a StreamInfoEntity with Final.

AddTargetedMessageInfo(MessageActivity, String)
Obsolete.

Adds targeted message info entity for prompt preview and strips quote placeholders.

AddText(MessageActivity, String)
Obsolete.

Appends text to the current message text.

GetAccountMention(MessageActivity, String)
Obsolete.

Gets the mention entity for a specific account id.

GetCitation(TeamsActivity)

Gets the first citation entity from the activity.

GetClientInfo(TeamsActivity)

Gets the first client information entity from the activity.

GetMentions(TeamsActivity)

Gets all mention entities from the activity.

GetMessageEntity(TeamsActivity)

Gets the first message entity from the activity.

GetProductInfo(TeamsActivity)

Gets the first product info entity from the activity.

GetQuotedMessages(TeamsActivity)

Gets all quoted reply entities from the activity.

GetSensitivityLabels(TeamsActivity)

Gets all sensitivity label entities from the activity.

GetStreamInfo(TeamsActivity)

Gets the first stream info entity from the activity.

GetTargetedMessageInfo(TeamsActivity)

Gets the first targeted message info entity from the activity.

PrependQuote(MessageActivity, String)
Obsolete.

Prepends a quoted message placeholder before existing text.

ToBotFrameworkActivity(CoreActivity)

Converts a CoreActivity to a Bot Framework Activity.

UpdateEntity(MessageActivity, Entity, Entity)
Obsolete.

Replaces an existing entity with a new entity.

WithAppId(MessageActivity, String)
Obsolete.

Sets the app id inside channel data.

WithAttachmentLayout(MessageActivity, AttachmentLayoutType)
Obsolete.

Sets the attachment layout for the message.

WithChannelId(MessageActivity, String)
Obsolete.

Sets the channel id.

WithConversation(MessageActivity, Conversation)
Obsolete.

Sets the conversation information.

WithData(MessageActivity, String, Object)
Obsolete.

Sets a channel data key/value property.

WithFrom(MessageActivity, ChannelAccount)
Obsolete.

Sets the sender account.

WithId(MessageActivity, String)
Obsolete.

Sets the activity id.

WithLocale(MessageActivity, String)
Obsolete.

Sets the locale.

WithLocalTimestamp(MessageActivity, String)
Obsolete.

Sets the local timestamp value.

WithRecipient(MessageActivity, ChannelAccount, Boolean)
Obsolete.

Sets the recipient account and targeted flag on the message.

WithRecipient(MessageActivity, ChannelAccount)
Obsolete.

Sets the recipient account on the message.

WithServiceUrl(MessageActivity, Uri)
Obsolete.

Sets the service url.

WithSuggestedActions(MessageActivity, SuggestedActions)
Obsolete.

Sets the suggested actions for the message.

WithText(MessageActivity, String, TextFormat)
Obsolete.

Sets the text content of the message.

WithText(MessageActivity, String)
Obsolete.

Sets the text content of the message.

WithTextFormat(MessageActivity, TextFormat)
Obsolete.

Sets the text format for the message.

WithTimestamp(MessageActivity, String)
Obsolete.

Sets the UTC timestamp value.

Applies to