Open
Description
Bug report
- [x ] I confirm this is a bug with Supabase, not with my own application.
- [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When calling presence.track()
the join
and leave
events are firing as well
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- setup listeners:
const presence = presenceChannel
.on('presence', { event: 'sync' }, () => {
const state = presenceChannel.presenceState<PresencePlayer>()
})
.on(
'presence',
{ event: 'join' },
({ key, newPresences }) => {
console.log('Player joined:', key, newPresences)
})
.on(
'presence',
{ event: 'leave' },
({ key, leftPresences }) => {
console.log('Player left:', key, leftPresences)
} )
}
```
2. call track `presence.track(updatedPlayer)`
3. The join and leave events fire
## Expected behavior
The join and leave events don't fire if there is no new user joining or leaving
## Screenshots

## System information
- OS: Windows
- Browser: chrome
- Version of supabase-js: 2.45.4
- Version of Node.js: 20.17.0
## Additional context