updating/dismissing 对话框提交后的消息
updating/dismissing message after dialog submitted
有没有办法做到以下任何一项:
一个。更新启动对话的聊天消息。
b.在对话框中存储 "hidden" 个字段。
基本上,我有一条通过邮件附件上的按钮打开的机器人邮件。我知道当用户单击按钮时,我会收到消息的 ts,那时我可以更改它。然而,在用户提交对话框之前,工作流程并不完整,但是对话框上的提交丢失了所有 original_message 内容,并且正在提交的对话框的 ts 不再与原始调用消息相对应。
如果有存储隐藏项的机制,我可以将原始 ts 或响应 url 存储在表单本身上。
谢谢!这是我的第一个松弛工作流程,所以任何建议都会像往常一样受到赞赏!
.....
建议的 指的是交互式消息,我已经用它来调用对话框了。
但是,这不是我的问题所在,而是对话框提交。
您无权访问对话框上的按钮元素,并且对话框元素只能有 5 个类型的元素:文本、select、文本区域。此外,考虑到来自交互式消息的操作调用实际上包括 post 中的原始消息返回到您的服务器,这有点矫枉过正。
所以我得到了 slack 开发支持:
Thanks for writing in, this is a great question!
You can use the callback_id parameter when calling dialog.open to store a string that will help your app locate the message. This callback_id will be returned to you in the dialog submission.
In your case, you could store the original message's ts and channel_id so that > you can locate the message to update.
I hope this helps! Let me know if you have any further questions!
所以,这有点老套(imo),但我确实让它工作了所以我想我会关闭这个问题以防其他人 运行 参与其中。
我只是在回调中解析原始 ts 值,其中包含一些我可以在表单提交时使用的其他数据。唯一的限制是它只能存储 200 个字符,但考虑到除了对话框中的 5 个字段之外,这应该足够了,其他内容在 post(用户、频道、 ETC)。
有没有办法做到以下任何一项:
一个。更新启动对话的聊天消息。 b.在对话框中存储 "hidden" 个字段。
基本上,我有一条通过邮件附件上的按钮打开的机器人邮件。我知道当用户单击按钮时,我会收到消息的 ts,那时我可以更改它。然而,在用户提交对话框之前,工作流程并不完整,但是对话框上的提交丢失了所有 original_message 内容,并且正在提交的对话框的 ts 不再与原始调用消息相对应。
如果有存储隐藏项的机制,我可以将原始 ts 或响应 url 存储在表单本身上。
谢谢!这是我的第一个松弛工作流程,所以任何建议都会像往常一样受到赞赏!
.....
建议的
但是,这不是我的问题所在,而是对话框提交。
您无权访问对话框上的按钮元素,并且对话框元素只能有 5 个类型的元素:文本、select、文本区域。此外,考虑到来自交互式消息的操作调用实际上包括 post 中的原始消息返回到您的服务器,这有点矫枉过正。
所以我得到了 slack 开发支持:
Thanks for writing in, this is a great question!
You can use the callback_id parameter when calling dialog.open to store a string that will help your app locate the message. This callback_id will be returned to you in the dialog submission.
In your case, you could store the original message's ts and channel_id so that > you can locate the message to update.
I hope this helps! Let me know if you have any further questions!
所以,这有点老套(imo),但我确实让它工作了所以我想我会关闭这个问题以防其他人 运行 参与其中。
我只是在回调中解析原始 ts 值,其中包含一些我可以在表单提交时使用的其他数据。唯一的限制是它只能存储 200 个字符,但考虑到除了对话框中的 5 个字段之外,这应该足够了,其他内容在 post(用户、频道、 ETC)。