@microsoft/teamsfx 2.0.1-alpha.e8170e1dc.0 → 2.0.1-alpha.f43656338.0
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
|
@@ -2370,8 +2370,17 @@ function getTargetType(conversationReference) {
|
|
|
2370
2370
|
* @internal
|
|
2371
2371
|
*/
|
|
2372
2372
|
function getTeamsBotInstallationId(context) {
|
|
2373
|
-
var _a, _b, _c
|
|
2374
|
-
|
|
2373
|
+
var _a, _b, _c;
|
|
2374
|
+
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;
|
|
2375
|
+
if (teamId) {
|
|
2376
|
+
return teamId;
|
|
2377
|
+
}
|
|
2378
|
+
// Fallback to use conversation id.
|
|
2379
|
+
// the conversation id is equal to team id only when the bot app is installed into the General channel.
|
|
2380
|
+
if (context.activity.conversation.name === undefined) {
|
|
2381
|
+
return context.activity.conversation.id;
|
|
2382
|
+
}
|
|
2383
|
+
return undefined;
|
|
2375
2384
|
}
|
|
2376
2385
|
|
|
2377
2386
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -3024,6 +3033,7 @@ class NotificationBot {
|
|
|
3024
3033
|
}
|
|
3025
3034
|
/**
|
|
3026
3035
|
* Returns the first {@link Channel} where predicate is true, and undefined otherwise.
|
|
3036
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise undefined will be returned.)
|
|
3027
3037
|
*
|
|
3028
3038
|
* @param predicate find calls predicate once for each channel of the installation,
|
|
3029
3039
|
* until it finds one where predicate returns true. If such a channel is found, find
|
|
@@ -3066,6 +3076,7 @@ class NotificationBot {
|
|
|
3066
3076
|
}
|
|
3067
3077
|
/**
|
|
3068
3078
|
* Returns all {@link Channel} where predicate is true, and empty array otherwise.
|
|
3079
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise empty array will be returned.)
|
|
3069
3080
|
*
|
|
3070
3081
|
* @param predicate find calls predicate for each channel of the installation.
|
|
3071
3082
|
* @returns an array of {@link Channel} where predicate is true, and empty array otherwise.
|