explicitly track user list sync, preference for which users' presence to subscribe #479
Open
3 tasks done
Labels
enhancement
M-T: A feature request for new functionality
Description
in the current implementation,
SlackClient#loadUsers()
will typically be called twice each time Hubot starts up. the first time, immediately. the second time, after the brain's storage connection is completed and the'loaded'
event is fired. this is wasteful.the second problem is that subscribing to user presence is tied to the brain
'loaded'
event, which seems incorrect. will this ever fire if the brain doesn't have any backing storage (just using memory)? will it only subscribe to a partial list of users (those who were in the brain when it loaded but not those who are modified afterSlackClient#loadUsers()
completes)?with the introduction of the Bluebird dependency, it seems like we can use Promises to create a better solution. here's some pseudo-code.
should we be handling
team_join
events too?should we centralize the two places where
@robot.brain.userForId
are called?Requirements (place an
x
in each of the[ ]
)The text was updated successfully, but these errors were encountered: