@microsoft/teams-js 2.0.0-beta.4-dev.23 → 2.0.0-beta.4-dev.24
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/MicrosoftTeams.js
CHANGED
|
@@ -1121,7 +1121,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1121
1121
|
});
|
|
1122
1122
|
|
|
1123
1123
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
|
1124
|
-
var version = "2.0.0-beta.4-dev.
|
|
1124
|
+
var version = "2.0.0-beta.4-dev.24";
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @hidden
|
|
1127
1127
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
|
@@ -4262,11 +4262,31 @@ var appInstallDialog;
|
|
|
4262
4262
|
appInstallDialog.isSupported = isSupported;
|
|
4263
4263
|
})(appInstallDialog || (appInstallDialog = {}));
|
|
4264
4264
|
|
|
4265
|
+
;// CONCATENATED MODULE: ./src/internal/chatConstants.ts
|
|
4266
|
+
var teamsDeepLinkUrlPathForChat = '/l/chat/0/0';
|
|
4267
|
+
var teamsDeepLinkUsersUrlParameterName = 'users';
|
|
4268
|
+
var teamsDeepLinkTopicUrlParameterName = 'topic';
|
|
4269
|
+
var teamsDeepLinkMessageUrlParameterName = 'message';
|
|
4270
|
+
|
|
4271
|
+
;// CONCATENATED MODULE: ./src/internal/chatUtilities.ts
|
|
4272
|
+
|
|
4273
|
+
|
|
4274
|
+
function createTeamsDeepLinkForChat(users, topic, message) {
|
|
4275
|
+
if (users.length === 0) {
|
|
4276
|
+
throw new Error('Must have at least one user when creating a chat deep link');
|
|
4277
|
+
}
|
|
4278
|
+
var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + users.map(function (user) { return encodeURIComponent(user); }).join(',');
|
|
4279
|
+
var topicSearchParameter = topic === undefined ? '' : "&" + teamsDeepLinkTopicUrlParameterName + "=" + encodeURIComponent(topic);
|
|
4280
|
+
var messageSearchParameter = message === undefined ? '' : "&" + teamsDeepLinkMessageUrlParameterName + "=" + encodeURIComponent(message);
|
|
4281
|
+
return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForChat + "?" + usersSearchParameter + topicSearchParameter + messageSearchParameter;
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4265
4284
|
;// CONCATENATED MODULE: ./src/public/chat.ts
|
|
4266
4285
|
|
|
4267
4286
|
|
|
4268
4287
|
|
|
4269
4288
|
|
|
4289
|
+
|
|
4270
4290
|
/**
|
|
4271
4291
|
* Contains functionality to start chat with others
|
|
4272
4292
|
*
|
|
@@ -4285,11 +4305,16 @@ var chat;
|
|
|
4285
4305
|
function openChat(openChatRequest) {
|
|
4286
4306
|
return new Promise(function (resolve) {
|
|
4287
4307
|
ensureInitialized(FrameContexts.content);
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4308
|
+
if (runtime.isLegacyTeams) {
|
|
4309
|
+
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat([openChatRequest.user], undefined /*topic*/, openChatRequest.message)));
|
|
4310
|
+
}
|
|
4311
|
+
else {
|
|
4312
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4313
|
+
members: openChatRequest.user,
|
|
4314
|
+
message: openChatRequest.message,
|
|
4315
|
+
});
|
|
4316
|
+
resolve(sendPromise);
|
|
4317
|
+
}
|
|
4293
4318
|
});
|
|
4294
4319
|
}
|
|
4295
4320
|
chat.openChat = openChat;
|
|
@@ -4316,12 +4341,17 @@ var chat;
|
|
|
4316
4341
|
}
|
|
4317
4342
|
else {
|
|
4318
4343
|
ensureInitialized(FrameContexts.content);
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4344
|
+
if (runtime.isLegacyTeams) {
|
|
4345
|
+
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat(openChatRequest.users, openChatRequest.topic, openChatRequest.message)));
|
|
4346
|
+
}
|
|
4347
|
+
else {
|
|
4348
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4349
|
+
members: openChatRequest.users,
|
|
4350
|
+
message: openChatRequest.message,
|
|
4351
|
+
topic: openChatRequest.topic,
|
|
4352
|
+
});
|
|
4353
|
+
resolve(sendPromise);
|
|
4354
|
+
}
|
|
4325
4355
|
}
|
|
4326
4356
|
});
|
|
4327
4357
|
}
|