Skip to content

Conversation

@jguz-pubnub
Copy link
Contributor

@jguz-pubnub jguz-pubnub commented Jun 17, 2024

fix(presence): calling .leave request in missing cases

@jguz-pubnub jguz-pubnub changed the title Calling .leave request after unsubscribing Calling .leave request when unsubscribing Jun 17, 2024
Copy link
Contributor

@parfeon parfeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

return state is Presence.HeartbeatCooldown
case .leftAll:
return !(state is Presence.HeartbeatInactive)
return true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we want to transit even if heartbeat loop is not active?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You're right, the heartbeat loop is inactive if the user subscribes to some channel without Presence. However, we still have to trigger .leave invocation as a part of the unsubscribe cleanup

@jguz-pubnub
Copy link
Contributor Author

@pubnub-release-bot release as 7.3.1

@jguz-pubnub jguz-pubnub merged commit 9868745 into master Jun 18, 2024
@jguz-pubnub jguz-pubnub deleted the fix/presence branch June 18, 2024 10:10
@pubnub-release-bot
Copy link

🚀 Release successfully completed 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants