Fix bug when the bot is not part of the conversation roster (#3581)

This commit is contained in:
Joel Mut 2021-11-16 11:37:11 -03:00 коммит произвёл GitHub
Родитель 236682418d
Коммит 5e30f95563
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -1,4 +1,5 @@
MicrosoftAppType=
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
MicrosoftAppTenantId=
BaseUrl=

Просмотреть файл

@ -15,8 +15,6 @@ class TeamsMessagingExtensionsActionBot extends TeamsActivityHandler {
return shareMessageCommand(context, action);
case 'webView':
return await webViewResponse(action);
default:
throw new Error('NotImplemented');
}
}
@ -89,7 +87,7 @@ function GetJustInTimeCardAttachment() {
{
text: 'Looks like you have not used Action Messaging Extension app in this team/chat. Please click **Continue** to add this app.',
type: 'TextBlock',
wrap: 'bolder'
wrap: true
}
],
type: 'AdaptiveCard',
@ -105,7 +103,7 @@ function GetAdaptiveCardAttachment() {
text: 'This app is installed in this conversation. You can now use it to do some great stuff!!!',
type: 'TextBlock',
isSubtle: false,
warp: true
wrap: true
}
],
type: 'AdaptiveCard',
@ -113,7 +111,7 @@ function GetAdaptiveCardAttachment() {
});
}
function createCardCommand(action) {
function createCardCommand(context, action) {
// The user has chosen to create a card by choosing the 'Create Card' context menu command.
const data = action.data;
const heroCard = CardFactory.heroCard(data.title, data.text);
@ -131,7 +129,7 @@ function createCardCommand(action) {
};
}
function shareMessageCommand(action) {
function shareMessageCommand(context, action) {
// The user has chosen to share a message by choosing the 'Share Message' context menu command.
let userName = 'unknown';
if (action.messagePayload.from &&