2022-01-19 10:22:54 +00:00
|
|
|
// Code generated by "callbackgen -type Slack"; DO NOT EDIT.
|
|
|
|
|
|
|
|
package interact
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/slack-go/slack/slackevents"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (s *Slack) OnAuthorized(cb func(userSession *SlackSession)) {
|
|
|
|
s.authorizedCallbacks = append(s.authorizedCallbacks, cb)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Slack) EmitAuthorized(userSession *SlackSession) {
|
|
|
|
for _, cb := range s.authorizedCallbacks {
|
|
|
|
cb(userSession)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:01:22 +00:00
|
|
|
func (s *Slack) OnEventsApi(cb func(evt slackevents.EventsAPIEvent)) {
|
2022-01-19 10:22:54 +00:00
|
|
|
s.eventsApiCallbacks = append(s.eventsApiCallbacks, cb)
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:01:22 +00:00
|
|
|
func (s *Slack) EmitEventsApi(evt slackevents.EventsAPIEvent) {
|
2022-01-19 10:22:54 +00:00
|
|
|
for _, cb := range s.eventsApiCallbacks {
|
2022-01-20 16:01:22 +00:00
|
|
|
cb(evt)
|
2022-01-19 10:22:54 +00:00
|
|
|
}
|
|
|
|
}
|