You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is possible to get information about teams/users/channels using session. But the problem is that it is not updating when something happens.
For example, consider a bot which logic is based on group members. In this case there could be some problems, when someone joined a channel or left it.
Possible solution is to implement some basic bot, that can update own session when something relative happens. And add some way of extension of that bot to let users write custom event handlers.
The text was updated successfully, but these errors were encountered:
You can implement a handler which does update the state and it would be a useful addition to the library but I didn't have the motivation to write it when I first released the bindings.
The docs in the latest (unreleased) version make the current behaviour clearer:
-- | When the connection is established, the slack server sends a bunch of
-- session information. This is accessible here.
--
-- (Caveat: this information represents things as they were when the
-- session was established; it is liable to become stale. If you care about
-- keeping an up-to-date view of this stuff, you need to track changes to
-- it using 'getNextEvent'.)
The current expectation is that users will maintain their own copy of SlackSession (or relevant parts) and keep it up-to-date manually. It would be convenient for slack-api to provide this functionality, however.
Currently it is possible to get information about teams/users/channels using session. But the problem is that it is not updating when something happens.
For example, consider a bot which logic is based on group members. In this case there could be some problems, when someone joined a channel or left it.
Possible solution is to implement some basic bot, that can update own session when something relative happens. And add some way of extension of that bot to let users write custom event handlers.
The text was updated successfully, but these errors were encountered: