Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug where space.enter() sometimes wouldn’t return
Calling presence.enter() does not necessarily result in the presence object emitting an ENTER event. This could happen, for example, if the channel does not become attached quickly enough, or if a transport upgrade is happening at roughly the same time as the presence enter call (note that the latter possibility means that we wouldn’t gain much by trying to work around the former by making sure the channel becomes attached before performing the presence enter). In both these cases, the only visible side effect of the presence enter call will be a PRESENT event emitted as a result of a presence SYNC. So, we update space.enter such that it also will return if it receives a PRESENT event for the current member. Resolves COL-335.
- Loading branch information