Hi
I try to sand http request (https://deep-sea.ru/rest/startIssue) by meens of Action Button in App.
I try it make by meens of slash command and it works.
I think this code must made it.
public async executeActionButtonHandler(
context: UIKitActionButtonInteractionContext,
read: IRead,
http: IHttp,
persistence: IPersistence,
modify: IModify
): Promise<IUIKitResponse> {
const {
buttonContext,
actionId,
triggerId,
user,
room,
message,
} = context.getInteractionData();
// If you have multiple action buttons, use `actionId` to determine
// which one the user interacted with
if (actionId === 'my-action-id') {
const blockBuilder = modify.getCreator().getBlockBuilder();
const response = await http.post('https://deep-sea.ru/rest/startIssue', {data: {id: '0'}});
return context.getInteractionResponder().openModalViewResponse({
title: blockBuilder.newPlainTextObject('Interaction received'),
blocks: blockBuilder.addSectionBlock({
text: blockBuilder.newPlainTextObject('We received your interaction, thanks!')
}).getBlocks(),
});
}
return context.getInteractionResponder().successResponse();
}
}
This error understand for me, this is because const response = await http.post('https://google.com); didn’t execute. As you understand http request to Google must be executed, 100%.
I tried to use this part of code const response = await http.post('https://google.com); when make App for slash command and it work perfectly.
I think we have some problem with method executeActionButtonHandler.