@microsoft/teamsfx 2.0.1-alpha.ba6cc7dba.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 +5 -0
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +15 -2
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +5 -0
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +15 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -3
- package/types/teamsfx.d.ts +4 -0
package/dist/index.esm2017.mjs
CHANGED
|
@@ -890,6 +890,8 @@ const defaultSQLScope = "https://database.windows.net/";
|
|
|
890
890
|
/**
|
|
891
891
|
* Generate connection configuration consumed by tedious.
|
|
892
892
|
*
|
|
893
|
+
* @deprecated we recommend you compose your own Tedious configuration for better flexibility.
|
|
894
|
+
*
|
|
893
895
|
* @param {TeamsFx} teamsfx - Used to provide configuration and auth
|
|
894
896
|
* @param { string? } databaseName - specify database name to override default one if there are multiple databases.
|
|
895
897
|
*
|
|
@@ -2368,8 +2370,17 @@ function getTargetType(conversationReference) {
|
|
|
2368
2370
|
* @internal
|
|
2369
2371
|
*/
|
|
2370
2372
|
function getTeamsBotInstallationId(context) {
|
|
2371
|
-
var _a, _b, _c
|
|
2372
|
-
|
|
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;
|
|
2373
2384
|
}
|
|
2374
2385
|
|
|
2375
2386
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -3022,6 +3033,7 @@ class NotificationBot {
|
|
|
3022
3033
|
}
|
|
3023
3034
|
/**
|
|
3024
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.)
|
|
3025
3037
|
*
|
|
3026
3038
|
* @param predicate find calls predicate once for each channel of the installation,
|
|
3027
3039
|
* until it finds one where predicate returns true. If such a channel is found, find
|
|
@@ -3064,6 +3076,7 @@ class NotificationBot {
|
|
|
3064
3076
|
}
|
|
3065
3077
|
/**
|
|
3066
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.)
|
|
3067
3080
|
*
|
|
3068
3081
|
* @param predicate find calls predicate for each channel of the installation.
|
|
3069
3082
|
* @returns an array of {@link Channel} where predicate is true, and empty array otherwise.
|