Add event type name validation & channel_type filter middleware #757
Labels
discussion
M-T: An issue where more input is needed to reach a decision
enhancement
M-T: A feature request for new functionality
Milestone
The Events API document says "you can subscribe
message.channels
events" but this could be confusing for developers.message.channels
is not an event type but a concatenated string value{event.type}.{event.channel_type}
.I propose two solutions for improving developer experience in regard to this matter.
Add a simple validation for event type in constraints
Bolt framework can suggest the right way to configure message event constraints by raising a validation error.
Add a built-in middleware to filter message events with
event.channel_type
.We may want to add a built-in reusable middleware to filter message type events by channel_type. But I think this is optional.
@aoberoi @stevengill @mwbrooks @misscoded
We may want to add the same validation to Bolt for JS and Bolt for Java. If there is no objection to it, I am happy to work on it. Thoughts?
Originally posted by @seratch in slackapi/bolt-python#201 (comment)
The text was updated successfully, but these errors were encountered: