It's not clear on which types of requests, which values can be returned in the callback and/or passed to the respond() function. I've started to build a table to at least describe the current state of things. This has led to uncovering some behaviors that I think are bugs or unintended, but at least we should describe them.
Type of Request
cb(): Message
cb(): Promise<Message>
respond(m: Message)
respond(m: Promise<Message>)
Notes
Message Action (Button, Select) incl. embeded in App Unfurl
synchronous response
if resolved under timeout, synchronous response; else response_url request
response_url request (can be used several times)
error: axios will likely throw
Dialog Submission
synchronous response
synchronous response
response_url request (can be used several times) - not a replacement, used as follow up
error: axios will likely throw
A warning is logged if the synchronous response takes longer than the timeout
Menu Options
synchronous response
synchronous response
-
-
A warning is logged if the synchronous response takes longer than the timeout
Edit: updated according to changes in #28
Requirements
[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
Description
It's not clear on which types of requests, which values can be returned in the callback and/or passed to the
respond()
function. I've started to build a table to at least describe the current state of things. This has led to uncovering some behaviors that I think are bugs or unintended, but at least we should describe them.cb(): Message
cb(): Promise<Message>
respond(m: Message)
respond(m: Promise<Message>)
response_url
requestresponse_url
request (can be used several times)response_url
request (can be used several times) - not a replacement, used as follow upEdit: updated according to changes in #28
Requirements