Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions msteams-platform/concepts/bots/bots-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords: teams bots context

# Get context for your Microsoft Teams bot

Your bot can access additional context about the team or chat, such as user profile. This information can be used to enrich your bot's functionality and provide a more personalized experience.
Your bot can access additional context about the team or chat, such as user profile. This information can be used to enrich your bot's functionality and provide a more personalized experience.

>**Note:** These Microsoft Teams–specific bot APIs are best accessed through our extensions for the Bot Builder SDK. For C#/.NET, download our [Microsoft.Bot.Connector.Teams](https://www.nuget.org/packages/Microsoft.Bot.Connector.Teams) NuGet package. For Node.js development, you can install the [botbuilder-teams](https://www.npmjs.com/package/botbuilder-teams) npm package.

Expand All @@ -18,7 +18,11 @@ Your bot can query for the list of team members and their basic profiles, which

#### REST API example

You can directly issue a GET request to [`/conversations/{teamId}/members/`](https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-api-reference#get-conversation-members) resource using `teamId` as the parameter in the API call.
You can directly issue a GET request on [`/conversations/{teamId}/members/`](https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-api-reference#get-conversation-members), using the value of `serviceUrl` as the endpoint.

Currently, the only source for `teamId` is a message from the team context—either a message from a user or the message that your bot receives when it is added to a team (see [Bot or user added to a team](botevents.md#bot-or-user-added-to-a-team)).

>**Note:** Be aware that the value of `serviceUrl` tends to be stable but can change. When a new message arrives, your bot should verify its stored value of `serviceUrl`.

```json
GET /v3/conversations/19:[email protected]/members
Expand Down Expand Up @@ -57,7 +61,7 @@ Call `GetTeamsConversationMembersAsync` using `Conversation.Id` to return a list
var connector = new ConnectorClient(new Uri(context.Activity.ServiceUrl));
var members = await connector.Conversations.GetTeamsConversationMembersAsync(context.Activity.Conversation.Id);

// Concatenate information about all the members into a string
// Concatenate information about all members into a string
var sb = new StringBuilder();
foreach (var member in members)
{
Expand All @@ -72,7 +76,7 @@ foreach (var member in members)
await context.PostAsync($"People in this conversation: {sb.ToString()}");
```

>**Note:** The `GetTeamsConversationMembersAsync(teamId, tenantId)` override is now obsolete. You should migrate your code to use `IConversations.GetConversationMembersAsync(conversationId)` and then use `AsTeamsChannelAccount` to get the extended properties.
>**Note:** The `GetTeamsConversationMembersAsync(teamId, tenantId)` override is now obsolete. If your code uses this override, update it to use `IConversations.GetConversationMembersAsync(conversationId)`; then use `AsTeamsChannelAccount` to get the extended properties.

#### Node.js example

Expand Down Expand Up @@ -105,12 +109,16 @@ The API call and SDK methods are identical to fetching the team roster, as is th
Your bot can query the list of channels in a team.

>**Notes**
>* Right now, the name of the default General channel is returned as `null` to allow for localization.>
>* Currently, the name of the default General channel is returned as `null` to allow for localization.>
>* The channel ID for the General channel always matchs the team ID.

#### REST API example

You can directly issue a GET request to `/teams/{teamId}/conversations/`.
You can directly issue a GET request on `/teams/{teamId}/conversations/`, using the value of `serviceUrl` as the endpoint.

Currently, the only source for `teamId` is a message from the team context—either a message from a user or the message that your bot receives when it is added to a team (see [Bot or user added to a team](botevents.md#bot-or-user-added-to-a-team)).

>**Note:** Be aware that the value of `serviceUrl` tends to be stable but can change. When a new message arrives, your bot should verify its stored value of `serviceUrl`.

```json
GET /v3/teams/19%3A033451497ea84fcc83d17ed7fb08a1b6%40thread.skype/conversations
Expand Down
2 changes: 1 addition & 1 deletion msteams-platform/concepts/bots/bots-conversations.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ If you choose to use the REST API, you can also call the [`/conversations/{conve

The message content itself can contain simple text or some of the Bot Framework–supplied [cards and card actions](~/concepts/cards-actions).

Please note that in your outbound schema you should always use the same `serviceUrl` as the one you received.
Please note that in your outbound schema you should always use the same `serviceUrl` as the one you received. Be aware that the value of `serviceUrl` tends to be stable but can change. When a new message arrives, your bot should verify its stored value of `serviceUrl`.

## Updating messages

Expand Down
2 changes: 1 addition & 1 deletion msteams-platform/publishing/office-store-guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords: teams publish store office publishing

# Use the Seller Dashboard to submit your Microsoft Teams app

For a general overview of the Microsoft Teams app submission flow, see [Submit your solutions to the Office Store](~/publishing/apps-publish).
For a general overview of the Microsoft Teams app submission flow, see [Publish your Microsoft Teams app to the Office Store](~/publishing/apps-publish).

In the Seller Dashboard:

Expand Down