-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Socket mode adapter as new default #108
Conversation
Deprecate the RTM version of the adapter. Fixes #84
These were for local testing
The only use is to notify users that Gort is online, which is still supported with this change. This also removes the need to identify the bot user on startup, which is less straightforward in Socket mode.
} | ||
|
||
// OnChannelMessage is called when the Slack API emits an MessageEvent for a message in a channel. | ||
func (s *ClassicAdapter) OnChannelMessage(event *slack.MessageEvent, info *adapter.Info) *adapter.ProviderEvent { |
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.
Note for the future: these OnFOO
methods are exported in the classic adapter (though they really don't need to be), and unexported in the new adapter. We might want to make them consistent eventually.
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.
Makes sense, do we want a follow up issue for it?
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.
Probably a good idea.
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.
Did you mean to include the cli
changes in this diff?
Figured it would prevent us having to get those white space changes into another PR, or having to remember to revert every time we run the books until we touch those files again. |
SGTM! |
Using a Classic Slack app is still supported, but results in a deprecation warning.
Socket mode is enabled by specifying the new
app_token
andbot_token
fields of theslack
config yaml instead of the Classicapi_token
field.A manifest file is provided to configure a new Socket mode app with the appropriate scopes.
Fixes #84