-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attach to event source other than express #81
Comments
Really good point. What would you expect for format for |
Could data just be the body sent from slack? I would think a single function you just pass that into and let slapp route it regardless of its a slash command or from the event API would be the nicest developer experience, but am remembering all the nuances with different slack payloads for different types and wonder how much of an issue that might be. |
Yes I was thinking it would be the data that slack posts to you. Basically the result of |
Trickiest part is that Slash commands are urlencoded, Events are application/json and actions are urlencoded json. |
Yeah that was certainly nice of them 😛. After thinking through this a bit, I think it's probably best to have 1 function per event type (event, slack, action, options) rather than inferring the event type which could get sketchy. I also think that, given this is a more generic handler that is abstracted away from the requests coming in, that dealing with the Content-type should be up whatever is dealing with that and have these functions take the POST data converted to JSON. That should be in line with most systems. |
I also have interest in this. My goal was to create a serverless slack framework but I ended up just prototying and sticking with the default express app. |
Totally, will make some time to check out that PR, been swamped lately but really want to see this feature added. |
Any updates on this? |
I'm sorry to say, but the maintainers of this project (bolt-js) no longer support the slapp library. Please let us close this issue now. |
I would like to use Slapp in a serverless environment. In doing so, I'm not actually ever running a real http server, all I have is the data from Slack's event api.
This would be fairly easy to hook up by just calling
slapp.reciever.emit("message", msg)
after building it, but I would like to have a supported way to pass in data and get it into slapp.I imagine this would look like:
This would take care of calling
context
, building theMessage
and sending it through Slapp.The text was updated successfully, but these errors were encountered: