Copy routing fields from an incoming activity and swap from/recipient.
The incoming activity to copy routing fields from.
this for method chaining.
Set the activity type (default is "message").
Activity type string.
this for method chaining.
Set the service URL.
Bot Service service URL for the channel.
this for method chaining.
Set the conversation.
Conversation reference.
this for method chaining.
Set the sender account.
Sender's channel account.
this for method chaining.
Set the recipient account.
Recipient's channel account.
this for method chaining.
Set the text content.
Message text.
this for method chaining.
Set the Teams-specific channel data.
OptionalchannelData: TeamsChannelDataTeams channel data (tenant, team, channel info, etc.).
this for method chaining.
Set the suggested actions.
OptionalsuggestedActions: SuggestedActionsQuick-reply buttons to display below the message.
this for method chaining.
Replace the entities array.
Optionalentities: Entity[]New entities array, or undefined to clear.
this for method chaining.
Replace the attachments array.
Optionalattachments: Attachment[]New attachments array, or undefined to clear.
this for method chaining.
Set a single attachment (replaces the collection).
The attachment to set.
this for method chaining.
Append an entity to the collection.
Entity to add.
this for method chaining.
Append an attachment to the collection.
Attachment to add.
this for method chaining.
Creates a mention entity for the account and adds it to entities.
Does NOT modify the activity text — caller must include <at>Name</at> markup.
The channel account to mention.
OptionalmentionText: stringOptional custom mention text; defaults to <at>account.name</at>.
this for method chaining.
Return the constructed TeamsActivity.
A shallow copy of the activity built so far.
Fluent builder for constructing outbound TeamsActivity instances.
Example