@microsoft/teamsfx 1.2.1-rc.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm2017.js +2 -0
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +13 -2
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +2 -0
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +13 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -3
- package/types/teamsfx.d.ts +2 -0
package/dist/index.esm2017.mjs
CHANGED
|
@@ -2368,8 +2368,17 @@ function getTargetType(conversationReference) {
|
|
|
2368
2368
|
* @internal
|
|
2369
2369
|
*/
|
|
2370
2370
|
function getTeamsBotInstallationId(context) {
|
|
2371
|
-
var _a, _b, _c
|
|
2372
|
-
|
|
2371
|
+
var _a, _b, _c;
|
|
2372
|
+
const teamId = (_c = (_b = (_a = context.activity) === null || _a === void 0 ? void 0 : _a.channelData) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id;
|
|
2373
|
+
if (teamId) {
|
|
2374
|
+
return teamId;
|
|
2375
|
+
}
|
|
2376
|
+
// Fallback to use conversation id.
|
|
2377
|
+
// the conversation id is equal to team id only when the bot app is installed into the General channel.
|
|
2378
|
+
if (context.activity.conversation.name === undefined) {
|
|
2379
|
+
return context.activity.conversation.id;
|
|
2380
|
+
}
|
|
2381
|
+
return undefined;
|
|
2373
2382
|
}
|
|
2374
2383
|
|
|
2375
2384
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -3022,6 +3031,7 @@ class NotificationBot {
|
|
|
3022
3031
|
}
|
|
3023
3032
|
/**
|
|
3024
3033
|
* Returns the first {@link Channel} where predicate is true, and undefined otherwise.
|
|
3034
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise undefined will be returned.)
|
|
3025
3035
|
*
|
|
3026
3036
|
* @param predicate find calls predicate once for each channel of the installation,
|
|
3027
3037
|
* until it finds one where predicate returns true. If such a channel is found, find
|
|
@@ -3064,6 +3074,7 @@ class NotificationBot {
|
|
|
3064
3074
|
}
|
|
3065
3075
|
/**
|
|
3066
3076
|
* Returns all {@link Channel} where predicate is true, and empty array otherwise.
|
|
3077
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise empty array will be returned.)
|
|
3067
3078
|
*
|
|
3068
3079
|
* @param predicate find calls predicate for each channel of the installation.
|
|
3069
3080
|
* @returns an array of {@link Channel} where predicate is true, and empty array otherwise.
|