Hola, implementé un atajo simple para obtener datos de la entrada, pero después de enviar la vista, no pude obtener la carga de respuesta o no puedo actualizar la vista para reconocer al usuario. siguiente es mi código simple.
const { App } = require("@slack/bolt"); const app = new App({ token: process.env.BOT_TOKEN, socketMode: true, signingSecret: process.env.SIGNIGN_SECRET, appToken: process.env.APP_TOKEN, }); app.shortcut({ callback_id: 'open_modal', type: 'message_action' }, async ({ shortcut, ack, client }) => { try { await ack(); console.log("Ack:") const result = await client.views.open({ trigger_id: shortcut.trigger_id, callback_id: "new-task-modal", view: { type: "modal", title: { type: "plain_text", text: "My App", }, submit: { type: "plain_text", text: "Submit", emoji: true, }, close: { type: "plain_text", text: "Cancel", }, blocks: [ { "type": "input", "element": { "type": "plain_text_input", "action_id": "plain_text_input-action" }, "label": { "type": "plain_text", "text": "Label", "emoji": true } } ], }, }); } catch (error) { console.log(error); } }); app.view({ callback_id: 'new-task-modal', type: 'message_action' }, async({ shortcut, ack, view, body }) => { try { console.log("New task modal",view.state.values ); await ack(); let result = await client.views.update({ view_id: body.view.id, view: { type: "modal", title: { type: "plain_text", text: "My App", emoji: true, }, close: { type: "plain_text", text: "Cancel", }, blocks: [ { type: "section", text: { type: "plain_text", text: "This is a plain text section block.", emoji: true, }, }, ], } }); } catch (error) { console.log(error) } }) La función app.shortcut() funciona bien y crea una vista, pero después de enviar esa vista, no pudo acceder a la función app.view() para actualizar la vista, así que hay alguna forma de actualizar la vista actual.