@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.node.cjs.js
CHANGED
|
@@ -2443,8 +2443,17 @@ function getTargetType(conversationReference) {
|
|
|
2443
2443
|
* @internal
|
|
2444
2444
|
*/
|
|
2445
2445
|
function getTeamsBotInstallationId(context) {
|
|
2446
|
-
var _a, _b, _c
|
|
2447
|
-
|
|
2446
|
+
var _a, _b, _c;
|
|
2447
|
+
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;
|
|
2448
|
+
if (teamId) {
|
|
2449
|
+
return teamId;
|
|
2450
|
+
}
|
|
2451
|
+
// Fallback to use conversation id.
|
|
2452
|
+
// the conversation id is equal to team id only when the bot app is installed into the General channel.
|
|
2453
|
+
if (context.activity.conversation.name === undefined) {
|
|
2454
|
+
return context.activity.conversation.id;
|
|
2455
|
+
}
|
|
2456
|
+
return undefined;
|
|
2448
2457
|
}
|
|
2449
2458
|
|
|
2450
2459
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -3139,6 +3148,7 @@ class NotificationBot {
|
|
|
3139
3148
|
}
|
|
3140
3149
|
/**
|
|
3141
3150
|
* Returns the first {@link Channel} where predicate is true, and undefined otherwise.
|
|
3151
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise undefined will be returned.)
|
|
3142
3152
|
*
|
|
3143
3153
|
* @param predicate find calls predicate once for each channel of the installation,
|
|
3144
3154
|
* until it finds one where predicate returns true. If such a channel is found, find
|
|
@@ -3185,6 +3195,7 @@ class NotificationBot {
|
|
|
3185
3195
|
}
|
|
3186
3196
|
/**
|
|
3187
3197
|
* Returns all {@link Channel} where predicate is true, and empty array otherwise.
|
|
3198
|
+
* (Ensure the bot app is installed into the `General` channel, otherwise empty array will be returned.)
|
|
3188
3199
|
*
|
|
3189
3200
|
* @param predicate find calls predicate for each channel of the installation.
|
|
3190
3201
|
* @returns an array of {@link Channel} where predicate is true, and empty array otherwise.
|