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
Socketmode Middleware Design Pattern #904
Conversation
Personally, I think it's a good idea. Let me consider whether this should be included in slack-go/slack. |
@kanata2 I cannot reproduce the error on go 1.15. I triggered the actions on my side https://github.com/xNok/slack/actions. Maybe re-running the action may be enough |
Hey xNok, love using a middleware pattern here. Noticed one quick thing while going over your PR
Would be great to get this into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for slow response. I added some comments.
@kanata2 is there anything that can be done to assist you in getting this PR merged in? It's been open since April :( |
@xNok Could you please add a note in the README that this is an EXPERIMENTAL feature? |
@kanata2 I added the comment in the readme As a side note I'll do a separate PR to fix that. |
// ChannelRename is sent when a channel is rename. | ||
ChannelRename = "channel_rename" | ||
ChannelRename = EventsAPIType("channel_rename") | ||
// ChannelIDChanged is sent when a channel identifier is changed. | ||
ChannelIDChanged = "channel_id_changed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed EventsAPIType^^
IS this PR going to be merged ? |
@zchee |
Just to find out whats the future of this PR if you're planning to implement something yourself @kanata2 ? And id be curious when would the new implantation be ready to use ? As having the functionality of this or another middleware makes it a lot simpler to interact with socketmode without the need for alot of boiler plate code just to structure an event handler ? |
@kanata2 have you any local develop branch, or something?
Where is you said "problem"? (just for confirming |
I'm plan to merge this and release v0.11.0 in a few days. |
@kanata2 What's the status of merge this? |
@zchee I believe it is good to merge. What do you think? |
@kanata2 I think so, too. |
I'll fix linter's error in another PR. |
I recently suggested (#899) to implement a middleware design pattern to make the use of socketmode convenient. I believe this to be such an improvement to my own code that I implemented it right away.
The basic concept behind is that it Matches incoming Event against the list of registered Event and calls all handler that are expecting that specific event. Much as you declare your routes when writing an APIs.