Skip to content

Commit

Permalink
Merge pull request #1429 from OfficeDev/v-jegadeesh/landing_scope
Browse files Browse the repository at this point in the history
updating feature - default landing scope to tab and bot
  • Loading branch information
Pawank-MSFT authored Oct 22, 2024
2 parents 9eb7332 + 791df36 commit fd900f1
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 7 deletions.
42 changes: 42 additions & 0 deletions samples/app-hello-world/csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,48 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual
- Go to your project directory, the ./appPackage folder, select the zip folder, and choose Open.
- Select Add in the pop-up dialog box. Your app is uploaded to Teams.
This app has a default landing capability that determines whether the opening scope is set to the Bot or a static tab.
To set the **Bot as the default landing capability**, configure the 'staticTabs' section in the manifest as follows:
```bash
"staticTabs": [
{
"entityId": "conversations",
"scopes": [
"personal"
]
},
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
"contentUrl": "https://${{BOT_DOMAIN}}/hello",
"scopes": [
"personal"
]
}
],
```
To set the **Tab as the default landing capability**, configure the 'staticTabs' section in the manifest as follows:
```bash
"staticTabs": [
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
"contentUrl": "https://${{BOT_DOMAIN}}/hello",
"scopes": [
"personal"
]
},
{
"entityId": "conversations",
"scopes": [
"personal"
]
}
],
```
**Note**: If you are facing any issue in your app, please uncomment [this](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/app-hello-world/csharp/Microsoft.Teams.Samples.HelloWorld.Web/AdapterWithErrorHandler.cs#L24) line and put your debugger for local debug.
## Running the sample
Expand Down
11 changes: 8 additions & 3 deletions samples/app-hello-world/csharp/TeamsApp/appPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
"manifestVersion": "1.19",
"version": "1.0.0",
"id": "${{TEAMS_APP_ID}}",
"packageName": "com.contoso.helloworld",
"developer": {
"name": "Contoso",
"websiteUrl": "https://www.microsoft.com",
Expand Down Expand Up @@ -31,6 +30,12 @@
"scopes": [
"personal"
]
},
{
"entityId": "conversations",
"scopes": [
"personal"
]
}
],
"configurableTabs": [
Expand Down
44 changes: 43 additions & 1 deletion samples/app-hello-world/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,55 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual
- **Upload** the `manifest.zip` to Teams (In Teams Apps/Manage your apps click "Upload an app". Browse to and Open the .zip file. At the next dialog, click the Add button.)
- Add the app to personal/team/groupChat scope (Supported scopes)
This app has a default landing capability that determines whether the opening scope is set to the Bot or a static tab.
To set the **Bot as the default landing capability**, configure the 'staticTabs' section in the manifest as follows:
```bash
"staticTabs": [
{
"entityId": "conversations",
"scopes": [
"personal"
]
},
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
"contentUrl": "https://${{BOT_DOMAIN}}/hello",
"scopes": [
"personal"
]
}
],
```
To set the **Tab as the default landing capability**, configure the 'staticTabs' section in the manifest as follows:
```bash
"staticTabs": [
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
"contentUrl": "https://${{BOT_DOMAIN}}/hello",
"scopes": [
"personal"
]
},
{
"entityId": "conversations",
"scopes": [
"personal"
]
}
],
```
**Note**: If you are facing any issue in your app, please uncomment [this](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/app-hello-world/nodejs/src/bot.js#L38) line and put your debugger for local debug.
## Running the sample
**Install App:**
![InstallApp](Images/Install.png.png)
![InstallApp](Images/Install.png)
**Hello World Bot:**
Expand Down
11 changes: 8 additions & 3 deletions samples/app-hello-world/nodejs/appManifest/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
"manifestVersion": "1.19",
"version": "1.0.0",
"id": "${{TEAMS_APP_ID}}",
"packageName": "com.contoso.helloworld",
"developer": {
"name": "Contoso",
"websiteUrl": "https://www.microsoft.com",
Expand All @@ -24,6 +23,12 @@
},
"accentColor": "#60A18E",
"staticTabs": [
{
"entityId": "conversations",
"scopes": [
"personal"
]
},
{
"entityId": "com.contoso.helloworld.hellotab",
"name": "Hello Tab",
Expand Down

0 comments on commit fd900f1

Please sign in to comment.